mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e04f316d6434a50d/out/
python_array_test.rs

1#![doc = "MAVLink python_array_test dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748}
1749impl MavCmd {
1750    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1751}
1752impl Default for MavCmd {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[cfg_attr(feature = "ts", derive(TS))]
1758#[cfg_attr(feature = "ts", ts(export))]
1759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1761#[cfg_attr(feature = "serde", serde(tag = "type"))]
1762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1763#[repr(u32)]
1764#[doc = "Possible actions an aircraft can take to avoid a collision."]
1765pub enum MavCollisionAction {
1766    #[doc = "Ignore any potential collisions"]
1767    MAV_COLLISION_ACTION_NONE = 0,
1768    #[doc = "Report potential collision"]
1769    MAV_COLLISION_ACTION_REPORT = 1,
1770    #[doc = "Ascend or Descend to avoid threat"]
1771    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1772    #[doc = "Move horizontally to avoid threat"]
1773    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1774    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1775    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1776    #[doc = "Aircraft to fly directly back to its launch point"]
1777    MAV_COLLISION_ACTION_RTL = 5,
1778    #[doc = "Aircraft to stop in place"]
1779    MAV_COLLISION_ACTION_HOVER = 6,
1780}
1781impl MavCollisionAction {
1782    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1783}
1784impl Default for MavCollisionAction {
1785    fn default() -> Self {
1786        Self::DEFAULT
1787    }
1788}
1789#[cfg_attr(feature = "ts", derive(TS))]
1790#[cfg_attr(feature = "ts", ts(export))]
1791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1793#[cfg_attr(feature = "serde", serde(tag = "type"))]
1794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1795#[repr(u32)]
1796#[doc = "Source of information about this collision."]
1797pub enum MavCollisionSrc {
1798    #[doc = "ID field references ADSB_VEHICLE packets"]
1799    MAV_COLLISION_SRC_ADSB = 0,
1800    #[doc = "ID field references MAVLink SRC ID"]
1801    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1802}
1803impl MavCollisionSrc {
1804    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1805}
1806impl Default for MavCollisionSrc {
1807    fn default() -> Self {
1808        Self::DEFAULT
1809    }
1810}
1811#[cfg_attr(feature = "ts", derive(TS))]
1812#[cfg_attr(feature = "ts", ts(export))]
1813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1815#[cfg_attr(feature = "serde", serde(tag = "type"))]
1816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1817#[repr(u32)]
1818#[doc = "Aircraft-rated danger from this threat."]
1819pub enum MavCollisionThreatLevel {
1820    #[doc = "Not a threat"]
1821    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1822    #[doc = "Craft is mildly concerned about this threat"]
1823    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1824    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1825    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1826}
1827impl MavCollisionThreatLevel {
1828    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1829}
1830impl Default for MavCollisionThreatLevel {
1831    fn default() -> Self {
1832        Self::DEFAULT
1833    }
1834}
1835#[cfg_attr(feature = "ts", derive(TS))]
1836#[cfg_attr(feature = "ts", ts(export))]
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1843pub enum MavComponent {
1844    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1845    MAV_COMP_ID_ALL = 0,
1846    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1847    MAV_COMP_ID_AUTOPILOT1 = 1,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER1 = 25,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER2 = 26,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER3 = 27,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER4 = 28,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER5 = 29,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER6 = 30,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER7 = 31,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER8 = 32,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER9 = 33,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER10 = 34,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER11 = 35,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER12 = 36,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER13 = 37,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER14 = 38,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER15 = 39,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER16 = 40,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER17 = 41,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER18 = 42,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER19 = 43,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER20 = 44,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER21 = 45,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER22 = 46,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER23 = 47,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER24 = 48,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER25 = 49,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER26 = 50,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER27 = 51,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER28 = 52,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER29 = 53,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER30 = 54,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER31 = 55,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER32 = 56,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER33 = 57,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER34 = 58,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER35 = 59,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER36 = 60,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER37 = 61,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER38 = 62,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER39 = 63,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER40 = 64,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER41 = 65,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER42 = 66,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER43 = 67,
1934    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1935    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER45 = 69,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER46 = 70,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER47 = 71,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER48 = 72,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER49 = 73,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER50 = 74,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER51 = 75,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER52 = 76,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER53 = 77,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER54 = 78,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER55 = 79,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER56 = 80,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER57 = 81,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER58 = 82,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER59 = 83,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER60 = 84,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER61 = 85,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER62 = 86,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER63 = 87,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER64 = 88,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER65 = 89,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER66 = 90,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER67 = 91,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER68 = 92,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER69 = 93,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER70 = 94,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER71 = 95,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER72 = 96,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER73 = 97,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER74 = 98,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER75 = 99,
1998    #[doc = "Camera #1."]
1999    MAV_COMP_ID_CAMERA = 100,
2000    #[doc = "Camera #2."]
2001    MAV_COMP_ID_CAMERA2 = 101,
2002    #[doc = "Camera #3."]
2003    MAV_COMP_ID_CAMERA3 = 102,
2004    #[doc = "Camera #4."]
2005    MAV_COMP_ID_CAMERA4 = 103,
2006    #[doc = "Camera #5."]
2007    MAV_COMP_ID_CAMERA5 = 104,
2008    #[doc = "Camera #6."]
2009    MAV_COMP_ID_CAMERA6 = 105,
2010    #[doc = "Servo #1."]
2011    MAV_COMP_ID_SERVO1 = 140,
2012    #[doc = "Servo #2."]
2013    MAV_COMP_ID_SERVO2 = 141,
2014    #[doc = "Servo #3."]
2015    MAV_COMP_ID_SERVO3 = 142,
2016    #[doc = "Servo #4."]
2017    MAV_COMP_ID_SERVO4 = 143,
2018    #[doc = "Servo #5."]
2019    MAV_COMP_ID_SERVO5 = 144,
2020    #[doc = "Servo #6."]
2021    MAV_COMP_ID_SERVO6 = 145,
2022    #[doc = "Servo #7."]
2023    MAV_COMP_ID_SERVO7 = 146,
2024    #[doc = "Servo #8."]
2025    MAV_COMP_ID_SERVO8 = 147,
2026    #[doc = "Servo #9."]
2027    MAV_COMP_ID_SERVO9 = 148,
2028    #[doc = "Servo #10."]
2029    MAV_COMP_ID_SERVO10 = 149,
2030    #[doc = "Servo #11."]
2031    MAV_COMP_ID_SERVO11 = 150,
2032    #[doc = "Servo #12."]
2033    MAV_COMP_ID_SERVO12 = 151,
2034    #[doc = "Servo #13."]
2035    MAV_COMP_ID_SERVO13 = 152,
2036    #[doc = "Servo #14."]
2037    MAV_COMP_ID_SERVO14 = 153,
2038    #[doc = "Gimbal #1."]
2039    MAV_COMP_ID_GIMBAL = 154,
2040    #[doc = "Logging component."]
2041    MAV_COMP_ID_LOG = 155,
2042    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2043    MAV_COMP_ID_ADSB = 156,
2044    #[doc = "On Screen Display (OSD) devices for video links."]
2045    MAV_COMP_ID_OSD = 157,
2046    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2047    MAV_COMP_ID_PERIPHERAL = 158,
2048    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2049    #[doc = "Gimbal ID for QX1."]
2050    MAV_COMP_ID_QX1_GIMBAL = 159,
2051    #[doc = "FLARM collision alert component."]
2052    MAV_COMP_ID_FLARM = 160,
2053    #[doc = "Parachute component."]
2054    MAV_COMP_ID_PARACHUTE = 161,
2055    #[doc = "Winch component."]
2056    MAV_COMP_ID_WINCH = 169,
2057    #[doc = "Gimbal #2."]
2058    MAV_COMP_ID_GIMBAL2 = 171,
2059    #[doc = "Gimbal #3."]
2060    MAV_COMP_ID_GIMBAL3 = 172,
2061    #[doc = "Gimbal #4"]
2062    MAV_COMP_ID_GIMBAL4 = 173,
2063    #[doc = "Gimbal #5."]
2064    MAV_COMP_ID_GIMBAL5 = 174,
2065    #[doc = "Gimbal #6."]
2066    MAV_COMP_ID_GIMBAL6 = 175,
2067    #[doc = "Battery #1."]
2068    MAV_COMP_ID_BATTERY = 180,
2069    #[doc = "Battery #2."]
2070    MAV_COMP_ID_BATTERY2 = 181,
2071    #[doc = "CAN over MAVLink client."]
2072    MAV_COMP_ID_MAVCAN = 189,
2073    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2074    MAV_COMP_ID_MISSIONPLANNER = 190,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2083    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2084    MAV_COMP_ID_PATHPLANNER = 195,
2085    #[doc = "Component that plans a collision free path between two points."]
2086    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2087    #[doc = "Component that provides position estimates using VIO techniques."]
2088    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2089    #[doc = "Component that manages pairing of vehicle and GCS."]
2090    MAV_COMP_ID_PAIRING_MANAGER = 198,
2091    #[doc = "Inertial Measurement Unit (IMU) #1."]
2092    MAV_COMP_ID_IMU = 200,
2093    #[doc = "Inertial Measurement Unit (IMU) #2."]
2094    MAV_COMP_ID_IMU_2 = 201,
2095    #[doc = "Inertial Measurement Unit (IMU) #3."]
2096    MAV_COMP_ID_IMU_3 = 202,
2097    #[doc = "GPS #1."]
2098    MAV_COMP_ID_GPS = 220,
2099    #[doc = "GPS #2."]
2100    MAV_COMP_ID_GPS2 = 221,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_1 = 236,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_2 = 237,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_3 = 238,
2107    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2108    MAV_COMP_ID_UDP_BRIDGE = 240,
2109    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2110    MAV_COMP_ID_UART_BRIDGE = 241,
2111    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2112    MAV_COMP_ID_TUNNEL_NODE = 242,
2113    #[doc = "Illuminator"]
2114    MAV_COMP_ID_ILLUMINATOR = 243,
2115    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2116    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2117    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2118}
2119impl MavComponent {
2120    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2121}
2122impl Default for MavComponent {
2123    fn default() -> Self {
2124        Self::DEFAULT
2125    }
2126}
2127#[cfg_attr(feature = "ts", derive(TS))]
2128#[cfg_attr(feature = "ts", ts(export))]
2129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2131#[cfg_attr(feature = "serde", serde(tag = "type"))]
2132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2133#[repr(u32)]
2134#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2135#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2136pub enum MavDataStream {
2137    #[doc = "Enable all data streams"]
2138    MAV_DATA_STREAM_ALL = 0,
2139    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2140    MAV_DATA_STREAM_RAW_SENSORS = 1,
2141    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2142    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2143    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2144    MAV_DATA_STREAM_RC_CHANNELS = 3,
2145    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2146    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2147    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2148    MAV_DATA_STREAM_POSITION = 6,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA1 = 10,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA2 = 11,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA3 = 12,
2155}
2156impl MavDataStream {
2157    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2158}
2159impl Default for MavDataStream {
2160    fn default() -> Self {
2161        Self::DEFAULT
2162    }
2163}
2164#[cfg_attr(feature = "ts", derive(TS))]
2165#[cfg_attr(feature = "ts", ts(export))]
2166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2168#[cfg_attr(feature = "serde", serde(tag = "type"))]
2169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2170#[repr(u32)]
2171#[doc = "Enumeration of distance sensor types"]
2172pub enum MavDistanceSensor {
2173    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2174    MAV_DISTANCE_SENSOR_LASER = 0,
2175    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2176    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2177    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2178    MAV_DISTANCE_SENSOR_INFRARED = 2,
2179    #[doc = "Radar type, e.g. uLanding units"]
2180    MAV_DISTANCE_SENSOR_RADAR = 3,
2181    #[doc = "Broken or unknown type, e.g. analog units"]
2182    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2183}
2184impl MavDistanceSensor {
2185    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2186}
2187impl Default for MavDistanceSensor {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[cfg_attr(feature = "ts", derive(TS))]
2193#[cfg_attr(feature = "ts", ts(export))]
2194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "serde", serde(tag = "type"))]
2197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2198#[repr(u32)]
2199#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2200pub enum MavDoRepositionFlags {
2201    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2202    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2203}
2204impl MavDoRepositionFlags {
2205    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2206}
2207impl Default for MavDoRepositionFlags {
2208    fn default() -> Self {
2209        Self::DEFAULT
2210    }
2211}
2212#[cfg_attr(feature = "ts", derive(TS))]
2213#[cfg_attr(feature = "ts", ts(export))]
2214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2216#[cfg_attr(feature = "serde", serde(tag = "type"))]
2217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2218#[repr(u32)]
2219#[doc = "Enumeration of estimator types"]
2220pub enum MavEstimatorType {
2221    #[doc = "Unknown type of the estimator."]
2222    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2223    #[doc = "This is a naive estimator without any real covariance feedback."]
2224    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2225    #[doc = "Computer vision based estimate. Might be up to scale."]
2226    MAV_ESTIMATOR_TYPE_VISION = 2,
2227    #[doc = "Visual-inertial estimate."]
2228    MAV_ESTIMATOR_TYPE_VIO = 3,
2229    #[doc = "Plain GPS estimate."]
2230    MAV_ESTIMATOR_TYPE_GPS = 4,
2231    #[doc = "Estimator integrating GPS and inertial sensing."]
2232    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2233    #[doc = "Estimate from external motion capturing system."]
2234    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2235    #[doc = "Estimator based on lidar sensor input."]
2236    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2237    #[doc = "Estimator on autopilot."]
2238    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2239}
2240impl MavEstimatorType {
2241    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2242}
2243impl Default for MavEstimatorType {
2244    fn default() -> Self {
2245        Self::DEFAULT
2246    }
2247}
2248#[cfg_attr(feature = "ts", derive(TS))]
2249#[cfg_attr(feature = "ts", ts(export))]
2250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2252#[cfg_attr(feature = "serde", serde(tag = "type"))]
2253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2254#[repr(u32)]
2255#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2256pub enum MavEventCurrentSequenceFlags {
2257    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2258    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2259}
2260impl MavEventCurrentSequenceFlags {
2261    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2262}
2263impl Default for MavEventCurrentSequenceFlags {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268#[cfg_attr(feature = "ts", derive(TS))]
2269#[cfg_attr(feature = "ts", ts(export))]
2270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2272#[cfg_attr(feature = "serde", serde(tag = "type"))]
2273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2274#[repr(u32)]
2275#[doc = "Reason for an event error response."]
2276pub enum MavEventErrorReason {
2277    #[doc = "The requested event is not available (anymore)."]
2278    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2279}
2280impl MavEventErrorReason {
2281    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2282}
2283impl Default for MavEventErrorReason {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[cfg_attr(feature = "ts", derive(TS))]
2289#[cfg_attr(feature = "ts", ts(export))]
2290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2292#[cfg_attr(feature = "serde", serde(tag = "type"))]
2293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2294#[repr(u32)]
2295#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2296pub enum MavFrame {
2297    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2298    MAV_FRAME_GLOBAL = 0,
2299    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2300    MAV_FRAME_LOCAL_NED = 1,
2301    #[doc = "NOT a coordinate frame, indicates a mission command."]
2302    MAV_FRAME_MISSION = 2,
2303    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2304    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2305    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2306    MAV_FRAME_LOCAL_ENU = 4,
2307    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2308    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2309    MAV_FRAME_GLOBAL_INT = 5,
2310    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2311    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2312    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2313    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2314    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2315    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2316    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2317    MAV_FRAME_BODY_NED = 8,
2318    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2319    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2320    MAV_FRAME_BODY_OFFSET_NED = 9,
2321    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2322    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2323    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2324    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2325    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2326    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2327    MAV_FRAME_BODY_FRD = 12,
2328    #[deprecated = "  (Deprecated since 2019-04)"]
2329    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2330    MAV_FRAME_RESERVED_13 = 13,
2331    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2332    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2333    MAV_FRAME_RESERVED_14 = 14,
2334    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2335    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2336    MAV_FRAME_RESERVED_15 = 15,
2337    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2338    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2339    MAV_FRAME_RESERVED_16 = 16,
2340    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2341    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2342    MAV_FRAME_RESERVED_17 = 17,
2343    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2344    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2345    MAV_FRAME_RESERVED_18 = 18,
2346    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2347    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2348    MAV_FRAME_RESERVED_19 = 19,
2349    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FRD = 20,
2351    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FLU = 21,
2353}
2354impl MavFrame {
2355    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2356}
2357impl Default for MavFrame {
2358    fn default() -> Self {
2359        Self::DEFAULT
2360    }
2361}
2362#[cfg_attr(feature = "ts", derive(TS))]
2363#[cfg_attr(feature = "ts", ts(export))]
2364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2366#[cfg_attr(feature = "serde", serde(tag = "type"))]
2367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2368#[repr(u32)]
2369#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2370pub enum MavFtpErr {
2371    #[doc = "None: No error"]
2372    MAV_FTP_ERR_NONE = 0,
2373    #[doc = "Fail: Unknown failure"]
2374    MAV_FTP_ERR_FAIL = 1,
2375    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2376    MAV_FTP_ERR_FAILERRNO = 2,
2377    #[doc = "InvalidDataSize: Payload size is invalid"]
2378    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2379    #[doc = "InvalidSession: Session is not currently open"]
2380    MAV_FTP_ERR_INVALIDSESSION = 4,
2381    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2382    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2383    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2384    MAV_FTP_ERR_EOF = 6,
2385    #[doc = "UnknownCommand: Unknown command / opcode"]
2386    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2387    #[doc = "FileExists: File/directory already exists"]
2388    MAV_FTP_ERR_FILEEXISTS = 8,
2389    #[doc = "FileProtected: File/directory is write protected"]
2390    MAV_FTP_ERR_FILEPROTECTED = 9,
2391    #[doc = "FileNotFound: File/directory not found"]
2392    MAV_FTP_ERR_FILENOTFOUND = 10,
2393}
2394impl MavFtpErr {
2395    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2396}
2397impl Default for MavFtpErr {
2398    fn default() -> Self {
2399        Self::DEFAULT
2400    }
2401}
2402#[cfg_attr(feature = "ts", derive(TS))]
2403#[cfg_attr(feature = "ts", ts(export))]
2404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2406#[cfg_attr(feature = "serde", serde(tag = "type"))]
2407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2408#[repr(u32)]
2409#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2410pub enum MavFtpOpcode {
2411    #[doc = "None. Ignored, always ACKed"]
2412    MAV_FTP_OPCODE_NONE = 0,
2413    #[doc = "TerminateSession: Terminates open Read session"]
2414    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2415    #[doc = "ResetSessions: Terminates all open read sessions"]
2416    MAV_FTP_OPCODE_RESETSESSION = 2,
2417    #[doc = "ListDirectory. List files and directories in path from offset"]
2418    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2419    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2420    MAV_FTP_OPCODE_OPENFILERO = 4,
2421    #[doc = "ReadFile: Reads size bytes from offset in session"]
2422    MAV_FTP_OPCODE_READFILE = 5,
2423    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2424    MAV_FTP_OPCODE_CREATEFILE = 6,
2425    #[doc = "WriteFile: Writes size bytes to offset in session"]
2426    MAV_FTP_OPCODE_WRITEFILE = 7,
2427    #[doc = "RemoveFile: Remove file at path"]
2428    MAV_FTP_OPCODE_REMOVEFILE = 8,
2429    #[doc = "CreateDirectory: Creates directory at path"]
2430    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2431    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2432    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2433    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2434    MAV_FTP_OPCODE_OPENFILEWO = 11,
2435    #[doc = "TruncateFile: Truncate file at path to offset length"]
2436    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2437    #[doc = "Rename: Rename path1 to path2"]
2438    MAV_FTP_OPCODE_RENAME = 13,
2439    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2440    MAV_FTP_OPCODE_CALCFILECRC = 14,
2441    #[doc = "BurstReadFile: Burst download session file"]
2442    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2443    #[doc = "ACK: ACK response"]
2444    MAV_FTP_OPCODE_ACK = 128,
2445    #[doc = "NAK: NAK response"]
2446    MAV_FTP_OPCODE_NAK = 129,
2447}
2448impl MavFtpOpcode {
2449    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2450}
2451impl Default for MavFtpOpcode {
2452    fn default() -> Self {
2453        Self::DEFAULT
2454    }
2455}
2456#[cfg_attr(feature = "ts", derive(TS))]
2457#[cfg_attr(feature = "ts", ts(export))]
2458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2460#[cfg_attr(feature = "serde", serde(tag = "type"))]
2461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2462#[repr(u32)]
2463#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2464pub enum MavFuelType {
2465    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2466    MAV_FUEL_TYPE_UNKNOWN = 0,
2467    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2468    MAV_FUEL_TYPE_LIQUID = 1,
2469    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2470    MAV_FUEL_TYPE_GAS = 2,
2471}
2472impl MavFuelType {
2473    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2474}
2475impl Default for MavFuelType {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2481impl MavGeneratorStatusFlag {
2482    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2483}
2484impl Default for MavGeneratorStatusFlag {
2485    fn default() -> Self {
2486        Self::DEFAULT
2487    }
2488}
2489#[cfg_attr(feature = "ts", derive(TS))]
2490#[cfg_attr(feature = "ts", ts(export))]
2491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2493#[cfg_attr(feature = "serde", serde(tag = "type"))]
2494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2495#[repr(u32)]
2496#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2497pub enum MavGoto {
2498    #[doc = "Hold at the current position."]
2499    MAV_GOTO_DO_HOLD = 0,
2500    #[doc = "Continue with the next item in mission execution."]
2501    MAV_GOTO_DO_CONTINUE = 1,
2502    #[doc = "Hold at the current position of the system"]
2503    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2504    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2505    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2506}
2507impl MavGoto {
2508    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2509}
2510impl Default for MavGoto {
2511    fn default() -> Self {
2512        Self::DEFAULT
2513    }
2514}
2515#[cfg_attr(feature = "ts", derive(TS))]
2516#[cfg_attr(feature = "ts", ts(export))]
2517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "serde", serde(tag = "type"))]
2520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2521#[repr(u32)]
2522#[doc = "Enumeration of landed detector states"]
2523pub enum MavLandedState {
2524    #[doc = "MAV landed state is unknown"]
2525    MAV_LANDED_STATE_UNDEFINED = 0,
2526    #[doc = "MAV is landed (on ground)"]
2527    MAV_LANDED_STATE_ON_GROUND = 1,
2528    #[doc = "MAV is in air"]
2529    MAV_LANDED_STATE_IN_AIR = 2,
2530    #[doc = "MAV currently taking off"]
2531    MAV_LANDED_STATE_TAKEOFF = 3,
2532    #[doc = "MAV currently landing"]
2533    MAV_LANDED_STATE_LANDING = 4,
2534}
2535impl MavLandedState {
2536    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2537}
2538impl Default for MavLandedState {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543#[cfg_attr(feature = "ts", derive(TS))]
2544#[cfg_attr(feature = "ts", ts(export))]
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2551pub enum MavMissionResult {
2552    #[doc = "mission accepted OK"]
2553    MAV_MISSION_ACCEPTED = 0,
2554    #[doc = "Generic error / not accepting mission commands at all right now."]
2555    MAV_MISSION_ERROR = 1,
2556    #[doc = "Coordinate frame is not supported."]
2557    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2558    #[doc = "Command is not supported."]
2559    MAV_MISSION_UNSUPPORTED = 3,
2560    #[doc = "Mission items exceed storage space."]
2561    MAV_MISSION_NO_SPACE = 4,
2562    #[doc = "One of the parameters has an invalid value."]
2563    MAV_MISSION_INVALID = 5,
2564    #[doc = "param1 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM1 = 6,
2566    #[doc = "param2 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM2 = 7,
2568    #[doc = "param3 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM3 = 8,
2570    #[doc = "param4 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM4 = 9,
2572    #[doc = "x / param5 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM5_X = 10,
2574    #[doc = "y / param6 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM6_Y = 11,
2576    #[doc = "z / param7 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM7 = 12,
2578    #[doc = "Mission item received out of sequence"]
2579    MAV_MISSION_INVALID_SEQUENCE = 13,
2580    #[doc = "Not accepting any mission commands from this communication partner."]
2581    MAV_MISSION_DENIED = 14,
2582    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2583    MAV_MISSION_OPERATION_CANCELLED = 15,
2584}
2585impl MavMissionResult {
2586    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2587}
2588impl Default for MavMissionResult {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Type of mission items being requested/sent in mission protocol."]
2601pub enum MavMissionType {
2602    #[doc = "Items are mission commands for main mission."]
2603    MAV_MISSION_TYPE_MISSION = 0,
2604    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2605    MAV_MISSION_TYPE_FENCE = 1,
2606    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2607    MAV_MISSION_TYPE_RALLY = 2,
2608    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2609    MAV_MISSION_TYPE_ALL = 255,
2610}
2611impl MavMissionType {
2612    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2613}
2614impl Default for MavMissionType {
2615    fn default() -> Self {
2616        Self::DEFAULT
2617    }
2618}
2619#[cfg_attr(feature = "ts", derive(TS))]
2620#[cfg_attr(feature = "ts", ts(export))]
2621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2623#[cfg_attr(feature = "serde", serde(tag = "type"))]
2624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2625#[repr(u32)]
2626#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2627pub enum MavMode {
2628    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2629    MAV_MODE_PREFLIGHT = 0,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_DISARMED = 80,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_ARMED = 208,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_DISARMED = 64,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_ARMED = 192,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_DISARMED = 88,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_ARMED = 216,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_DISARMED = 92,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_ARMED = 220,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_DISARMED = 66,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_ARMED = 194,
2650}
2651impl MavMode {
2652    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2653}
2654impl Default for MavMode {
2655    fn default() -> Self {
2656        Self::DEFAULT
2657    }
2658}
2659bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2660impl MavModeFlag {
2661    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2662}
2663impl Default for MavModeFlag {
2664    fn default() -> Self {
2665        Self::DEFAULT
2666    }
2667}
2668#[cfg_attr(feature = "ts", derive(TS))]
2669#[cfg_attr(feature = "ts", ts(export))]
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2676pub enum MavModeFlagDecodePosition {
2677    #[doc = "First bit:  10000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2679    #[doc = "Second bit: 01000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2681    #[doc = "Third bit:  00100000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2683    #[doc = "Fourth bit: 00010000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2685    #[doc = "Fifth bit:  00001000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2687    #[doc = "Sixth bit:   00000100"]
2688    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2689    #[doc = "Seventh bit: 00000010"]
2690    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2691    #[doc = "Eighth bit: 00000001"]
2692    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2693}
2694impl MavModeFlagDecodePosition {
2695    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2696}
2697impl Default for MavModeFlagDecodePosition {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2703impl MavModeProperty {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2705}
2706impl Default for MavModeProperty {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711#[cfg_attr(feature = "ts", derive(TS))]
2712#[cfg_attr(feature = "ts", ts(export))]
2713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "serde", serde(tag = "type"))]
2716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2717#[repr(u32)]
2718#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2719#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2720pub enum MavMountMode {
2721    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2722    MAV_MOUNT_MODE_RETRACT = 0,
2723    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2724    MAV_MOUNT_MODE_NEUTRAL = 1,
2725    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2727    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_RC_TARGETING = 3,
2729    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2730    MAV_MOUNT_MODE_GPS_POINT = 4,
2731    #[doc = "Gimbal tracks system with specified system ID"]
2732    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2733    #[doc = "Gimbal tracks home position"]
2734    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2735}
2736impl MavMountMode {
2737    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2738}
2739impl Default for MavMountMode {
2740    fn default() -> Self {
2741        Self::DEFAULT
2742    }
2743}
2744#[cfg_attr(feature = "ts", derive(TS))]
2745#[cfg_attr(feature = "ts", ts(export))]
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751pub enum MavOdidArmStatus {
2752    #[doc = "Passing arming checks."]
2753    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2754    #[doc = "Generic arming failure, see error string for details."]
2755    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2756}
2757impl MavOdidArmStatus {
2758    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2759}
2760impl Default for MavOdidArmStatus {
2761    fn default() -> Self {
2762        Self::DEFAULT
2763    }
2764}
2765#[cfg_attr(feature = "ts", derive(TS))]
2766#[cfg_attr(feature = "ts", ts(export))]
2767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2769#[cfg_attr(feature = "serde", serde(tag = "type"))]
2770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2771#[repr(u32)]
2772pub enum MavOdidAuthType {
2773    #[doc = "No authentication type is specified."]
2774    MAV_ODID_AUTH_TYPE_NONE = 0,
2775    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2776    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2777    #[doc = "Signature for the Operator ID."]
2778    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2779    #[doc = "Signature for the entire message set."]
2780    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2781    #[doc = "Authentication is provided by Network Remote ID."]
2782    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2783    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2784    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2785}
2786impl MavOdidAuthType {
2787    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2788}
2789impl Default for MavOdidAuthType {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidCategoryEu {
2802    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2803    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2804    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2805    MAV_ODID_CATEGORY_EU_OPEN = 1,
2806    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2807    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2808    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2809    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2810}
2811impl MavOdidCategoryEu {
2812    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2813}
2814impl Default for MavOdidCategoryEu {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826pub enum MavOdidClassEu {
2827    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2828    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2830    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2832    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2834    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2836    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2838    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2840    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2842    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2843}
2844impl MavOdidClassEu {
2845    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2846}
2847impl Default for MavOdidClassEu {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidClassificationType {
2860    #[doc = "The classification type for the UA is undeclared."]
2861    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2862    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2863    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2864}
2865impl MavOdidClassificationType {
2866    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2867}
2868impl Default for MavOdidClassificationType {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidDescType {
2881    #[doc = "Optional free-form text description of the purpose of the flight."]
2882    MAV_ODID_DESC_TYPE_TEXT = 0,
2883    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2885    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2887}
2888impl MavOdidDescType {
2889    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2890}
2891impl Default for MavOdidDescType {
2892    fn default() -> Self {
2893        Self::DEFAULT
2894    }
2895}
2896#[cfg_attr(feature = "ts", derive(TS))]
2897#[cfg_attr(feature = "ts", ts(export))]
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903pub enum MavOdidHeightRef {
2904    #[doc = "The height field is relative to the take-off location."]
2905    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2906    #[doc = "The height field is relative to ground."]
2907    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2908}
2909impl MavOdidHeightRef {
2910    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2911}
2912impl Default for MavOdidHeightRef {
2913    fn default() -> Self {
2914        Self::DEFAULT
2915    }
2916}
2917#[cfg_attr(feature = "ts", derive(TS))]
2918#[cfg_attr(feature = "ts", ts(export))]
2919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2921#[cfg_attr(feature = "serde", serde(tag = "type"))]
2922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2923#[repr(u32)]
2924pub enum MavOdidHorAcc {
2925    #[doc = "The horizontal accuracy is unknown."]
2926    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2927    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2928    MAV_ODID_HOR_ACC_10NM = 1,
2929    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2930    MAV_ODID_HOR_ACC_4NM = 2,
2931    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2932    MAV_ODID_HOR_ACC_2NM = 3,
2933    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2934    MAV_ODID_HOR_ACC_1NM = 4,
2935    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2936    MAV_ODID_HOR_ACC_0_5NM = 5,
2937    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2938    MAV_ODID_HOR_ACC_0_3NM = 6,
2939    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2940    MAV_ODID_HOR_ACC_0_1NM = 7,
2941    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2942    MAV_ODID_HOR_ACC_0_05NM = 8,
2943    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2944    MAV_ODID_HOR_ACC_30_METER = 9,
2945    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2946    MAV_ODID_HOR_ACC_10_METER = 10,
2947    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2948    MAV_ODID_HOR_ACC_3_METER = 11,
2949    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2950    MAV_ODID_HOR_ACC_1_METER = 12,
2951}
2952impl MavOdidHorAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidHorAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidIdType {
2968    #[doc = "No type defined."]
2969    MAV_ODID_ID_TYPE_NONE = 0,
2970    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2971    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2972    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2973    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2974    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2975    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2976    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2977    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2978}
2979impl MavOdidIdType {
2980    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2981}
2982impl Default for MavOdidIdType {
2983    fn default() -> Self {
2984        Self::DEFAULT
2985    }
2986}
2987#[cfg_attr(feature = "ts", derive(TS))]
2988#[cfg_attr(feature = "ts", ts(export))]
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994pub enum MavOdidOperatorIdType {
2995    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2996    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2997}
2998impl MavOdidOperatorIdType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3000}
3001impl Default for MavOdidOperatorIdType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidOperatorLocationType {
3014    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3016    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3018    #[doc = "The location/altitude of the operator are fixed values."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3020}
3021impl MavOdidOperatorLocationType {
3022    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3023}
3024impl Default for MavOdidOperatorLocationType {
3025    fn default() -> Self {
3026        Self::DEFAULT
3027    }
3028}
3029#[cfg_attr(feature = "ts", derive(TS))]
3030#[cfg_attr(feature = "ts", ts(export))]
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidSpeedAcc {
3037    #[doc = "The speed accuracy is unknown."]
3038    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3039    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3040    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3041    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3042    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3043    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3044    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3045    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3046    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3047}
3048impl MavOdidSpeedAcc {
3049    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3050}
3051impl Default for MavOdidSpeedAcc {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidStatus {
3064    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3065    MAV_ODID_STATUS_UNDECLARED = 0,
3066    #[doc = "The UA is on the ground."]
3067    MAV_ODID_STATUS_GROUND = 1,
3068    #[doc = "The UA is in the air."]
3069    MAV_ODID_STATUS_AIRBORNE = 2,
3070    #[doc = "The UA is having an emergency."]
3071    MAV_ODID_STATUS_EMERGENCY = 3,
3072    #[doc = "The remote ID system is failing or unreliable in some way."]
3073    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3074}
3075impl MavOdidStatus {
3076    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3077}
3078impl Default for MavOdidStatus {
3079    fn default() -> Self {
3080        Self::DEFAULT
3081    }
3082}
3083#[cfg_attr(feature = "ts", derive(TS))]
3084#[cfg_attr(feature = "ts", ts(export))]
3085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3087#[cfg_attr(feature = "serde", serde(tag = "type"))]
3088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3089#[repr(u32)]
3090pub enum MavOdidTimeAcc {
3091    #[doc = "The timestamp accuracy is unknown."]
3092    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3094    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3096    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3098    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3100    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3102    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3104    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3106    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3108    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3110    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3112    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3114    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3116    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3118    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3120    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3122    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3123}
3124impl MavOdidTimeAcc {
3125    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3126}
3127impl Default for MavOdidTimeAcc {
3128    fn default() -> Self {
3129        Self::DEFAULT
3130    }
3131}
3132#[cfg_attr(feature = "ts", derive(TS))]
3133#[cfg_attr(feature = "ts", ts(export))]
3134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3136#[cfg_attr(feature = "serde", serde(tag = "type"))]
3137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3138#[repr(u32)]
3139pub enum MavOdidUaType {
3140    #[doc = "No UA (Unmanned Aircraft) type defined."]
3141    MAV_ODID_UA_TYPE_NONE = 0,
3142    #[doc = "Aeroplane/Airplane. Fixed wing."]
3143    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3144    #[doc = "Helicopter or multirotor."]
3145    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3146    #[doc = "Gyroplane."]
3147    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3148    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3149    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3150    #[doc = "Ornithopter."]
3151    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3152    #[doc = "Glider."]
3153    MAV_ODID_UA_TYPE_GLIDER = 6,
3154    #[doc = "Kite."]
3155    MAV_ODID_UA_TYPE_KITE = 7,
3156    #[doc = "Free Balloon."]
3157    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3158    #[doc = "Captive Balloon."]
3159    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3160    #[doc = "Airship. E.g. a blimp."]
3161    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3162    #[doc = "Free Fall/Parachute (unpowered)."]
3163    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3164    #[doc = "Rocket."]
3165    MAV_ODID_UA_TYPE_ROCKET = 12,
3166    #[doc = "Tethered powered aircraft."]
3167    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3168    #[doc = "Ground Obstacle."]
3169    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3170    #[doc = "Other type of aircraft not listed earlier."]
3171    MAV_ODID_UA_TYPE_OTHER = 15,
3172}
3173impl MavOdidUaType {
3174    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3175}
3176impl Default for MavOdidUaType {
3177    fn default() -> Self {
3178        Self::DEFAULT
3179    }
3180}
3181#[cfg_attr(feature = "ts", derive(TS))]
3182#[cfg_attr(feature = "ts", ts(export))]
3183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3185#[cfg_attr(feature = "serde", serde(tag = "type"))]
3186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3187#[repr(u32)]
3188pub enum MavOdidVerAcc {
3189    #[doc = "The vertical accuracy is unknown."]
3190    MAV_ODID_VER_ACC_UNKNOWN = 0,
3191    #[doc = "The vertical accuracy is smaller than 150 meter."]
3192    MAV_ODID_VER_ACC_150_METER = 1,
3193    #[doc = "The vertical accuracy is smaller than 45 meter."]
3194    MAV_ODID_VER_ACC_45_METER = 2,
3195    #[doc = "The vertical accuracy is smaller than 25 meter."]
3196    MAV_ODID_VER_ACC_25_METER = 3,
3197    #[doc = "The vertical accuracy is smaller than 10 meter."]
3198    MAV_ODID_VER_ACC_10_METER = 4,
3199    #[doc = "The vertical accuracy is smaller than 3 meter."]
3200    MAV_ODID_VER_ACC_3_METER = 5,
3201    #[doc = "The vertical accuracy is smaller than 1 meter."]
3202    MAV_ODID_VER_ACC_1_METER = 6,
3203}
3204impl MavOdidVerAcc {
3205    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3206}
3207impl Default for MavOdidVerAcc {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[cfg_attr(feature = "ts", derive(TS))]
3213#[cfg_attr(feature = "ts", ts(export))]
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3220pub enum MavParamExtType {
3221    #[doc = "8-bit unsigned integer"]
3222    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3223    #[doc = "8-bit signed integer"]
3224    MAV_PARAM_EXT_TYPE_INT8 = 2,
3225    #[doc = "16-bit unsigned integer"]
3226    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3227    #[doc = "16-bit signed integer"]
3228    MAV_PARAM_EXT_TYPE_INT16 = 4,
3229    #[doc = "32-bit unsigned integer"]
3230    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3231    #[doc = "32-bit signed integer"]
3232    MAV_PARAM_EXT_TYPE_INT32 = 6,
3233    #[doc = "64-bit unsigned integer"]
3234    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3235    #[doc = "64-bit signed integer"]
3236    MAV_PARAM_EXT_TYPE_INT64 = 8,
3237    #[doc = "32-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3239    #[doc = "64-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3241    #[doc = "Custom Type"]
3242    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3243}
3244impl MavParamExtType {
3245    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3246}
3247impl Default for MavParamExtType {
3248    fn default() -> Self {
3249        Self::DEFAULT
3250    }
3251}
3252#[cfg_attr(feature = "ts", derive(TS))]
3253#[cfg_attr(feature = "ts", ts(export))]
3254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3256#[cfg_attr(feature = "serde", serde(tag = "type"))]
3257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3258#[repr(u32)]
3259#[doc = "Specifies the datatype of a MAVLink parameter."]
3260pub enum MavParamType {
3261    #[doc = "8-bit unsigned integer"]
3262    MAV_PARAM_TYPE_UINT8 = 1,
3263    #[doc = "8-bit signed integer"]
3264    MAV_PARAM_TYPE_INT8 = 2,
3265    #[doc = "16-bit unsigned integer"]
3266    MAV_PARAM_TYPE_UINT16 = 3,
3267    #[doc = "16-bit signed integer"]
3268    MAV_PARAM_TYPE_INT16 = 4,
3269    #[doc = "32-bit unsigned integer"]
3270    MAV_PARAM_TYPE_UINT32 = 5,
3271    #[doc = "32-bit signed integer"]
3272    MAV_PARAM_TYPE_INT32 = 6,
3273    #[doc = "64-bit unsigned integer"]
3274    MAV_PARAM_TYPE_UINT64 = 7,
3275    #[doc = "64-bit signed integer"]
3276    MAV_PARAM_TYPE_INT64 = 8,
3277    #[doc = "32-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL32 = 9,
3279    #[doc = "64-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL64 = 10,
3281}
3282impl MavParamType {
3283    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3284}
3285impl Default for MavParamType {
3286    fn default() -> Self {
3287        Self::DEFAULT
3288    }
3289}
3290bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3291impl MavPowerStatus {
3292    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3293}
3294impl Default for MavPowerStatus {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3300impl MavProtocolCapability {
3301    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3302}
3303impl Default for MavProtocolCapability {
3304    fn default() -> Self {
3305        Self::DEFAULT
3306    }
3307}
3308#[cfg_attr(feature = "ts", derive(TS))]
3309#[cfg_attr(feature = "ts", ts(export))]
3310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3312#[cfg_attr(feature = "serde", serde(tag = "type"))]
3313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3314#[repr(u32)]
3315#[doc = "Result from a MAVLink command (MAV_CMD)"]
3316pub enum MavResult {
3317    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3318    MAV_RESULT_ACCEPTED = 0,
3319    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3320    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3321    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3322    MAV_RESULT_DENIED = 2,
3323    #[doc = "Command is not supported (unknown)."]
3324    MAV_RESULT_UNSUPPORTED = 3,
3325    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3326    MAV_RESULT_FAILED = 4,
3327    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3328    MAV_RESULT_IN_PROGRESS = 5,
3329    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3330    MAV_RESULT_CANCELLED = 6,
3331    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3332    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3333    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3334    MAV_RESULT_COMMAND_INT_ONLY = 8,
3335    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3336    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3337}
3338impl MavResult {
3339    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3340}
3341impl Default for MavResult {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[cfg_attr(feature = "ts", derive(TS))]
3347#[cfg_attr(feature = "ts", ts(export))]
3348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3350#[cfg_attr(feature = "serde", serde(tag = "type"))]
3351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3352#[repr(u32)]
3353#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3354#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3355pub enum MavRoi {
3356    #[doc = "No region of interest."]
3357    MAV_ROI_NONE = 0,
3358    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3359    MAV_ROI_WPNEXT = 1,
3360    #[doc = "Point toward given waypoint."]
3361    MAV_ROI_WPINDEX = 2,
3362    #[doc = "Point toward fixed location."]
3363    MAV_ROI_LOCATION = 3,
3364    #[doc = "Point toward of given id."]
3365    MAV_ROI_TARGET = 4,
3366}
3367impl MavRoi {
3368    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3369}
3370impl Default for MavRoi {
3371    fn default() -> Self {
3372        Self::DEFAULT
3373    }
3374}
3375#[cfg_attr(feature = "ts", derive(TS))]
3376#[cfg_attr(feature = "ts", ts(export))]
3377#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3379#[cfg_attr(feature = "serde", serde(tag = "type"))]
3380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3381#[repr(u32)]
3382#[doc = "Enumeration of sensor orientation, according to its rotations"]
3383pub enum MavSensorOrientation {
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3385    MAV_SENSOR_ROTATION_NONE = 0,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3387    MAV_SENSOR_ROTATION_YAW_45 = 1,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3389    MAV_SENSOR_ROTATION_YAW_90 = 2,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3391    MAV_SENSOR_ROTATION_YAW_135 = 3,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3393    MAV_SENSOR_ROTATION_YAW_180 = 4,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3395    MAV_SENSOR_ROTATION_YAW_225 = 5,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3397    MAV_SENSOR_ROTATION_YAW_270 = 6,
3398    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3399    MAV_SENSOR_ROTATION_YAW_315 = 7,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3401    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3406    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3407    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3408    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3409    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3414    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3415    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3417    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3422    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3423    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3425    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3430    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3431    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3432    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3434    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3438    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3439    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3440    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3442    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3444    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3446    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3448    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3450    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3452    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3454    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3455    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3456    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3458    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3459    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3460    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3461    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3462    #[doc = "Pitch: 315"]
3463    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3464    #[doc = "Roll: 90, Pitch: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3466    #[doc = "Custom orientation"]
3467    MAV_SENSOR_ROTATION_CUSTOM = 100,
3468}
3469impl MavSensorOrientation {
3470    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3471}
3472impl Default for MavSensorOrientation {
3473    fn default() -> Self {
3474        Self::DEFAULT
3475    }
3476}
3477#[cfg_attr(feature = "ts", derive(TS))]
3478#[cfg_attr(feature = "ts", ts(export))]
3479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3481#[cfg_attr(feature = "serde", serde(tag = "type"))]
3482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3483#[repr(u32)]
3484#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3485pub enum MavSeverity {
3486    #[doc = "System is unusable. This is a \"panic\" condition."]
3487    MAV_SEVERITY_EMERGENCY = 0,
3488    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3489    MAV_SEVERITY_ALERT = 1,
3490    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3491    MAV_SEVERITY_CRITICAL = 2,
3492    #[doc = "Indicates an error in secondary/redundant systems."]
3493    MAV_SEVERITY_ERROR = 3,
3494    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3495    MAV_SEVERITY_WARNING = 4,
3496    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3497    MAV_SEVERITY_NOTICE = 5,
3498    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3499    MAV_SEVERITY_INFO = 6,
3500    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3501    MAV_SEVERITY_DEBUG = 7,
3502}
3503impl MavSeverity {
3504    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3505}
3506impl Default for MavSeverity {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3519pub enum MavStandardMode {
3520    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3521    MAV_STANDARD_MODE_NON_STANDARD = 0,
3522    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3524    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_ORBIT = 2,
3526    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_CRUISE = 3,
3528    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3529    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3530    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3531    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3532    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3533    MAV_STANDARD_MODE_MISSION = 6,
3534    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_LAND = 7,
3536    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3537    MAV_STANDARD_MODE_TAKEOFF = 8,
3538}
3539impl MavStandardMode {
3540    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3541}
3542impl Default for MavStandardMode {
3543    fn default() -> Self {
3544        Self::DEFAULT
3545    }
3546}
3547#[cfg_attr(feature = "ts", derive(TS))]
3548#[cfg_attr(feature = "ts", ts(export))]
3549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3551#[cfg_attr(feature = "serde", serde(tag = "type"))]
3552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3553#[repr(u32)]
3554pub enum MavState {
3555    #[doc = "Uninitialized system, state is unknown."]
3556    MAV_STATE_UNINIT = 0,
3557    #[doc = "System is booting up."]
3558    MAV_STATE_BOOT = 1,
3559    #[doc = "System is calibrating and not flight-ready."]
3560    MAV_STATE_CALIBRATING = 2,
3561    #[doc = "System is grounded and on standby. It can be launched any time."]
3562    MAV_STATE_STANDBY = 3,
3563    #[doc = "System is active and might be already airborne. Motors are engaged."]
3564    MAV_STATE_ACTIVE = 4,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3566    MAV_STATE_CRITICAL = 5,
3567    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3568    MAV_STATE_EMERGENCY = 6,
3569    #[doc = "System just initialized its power-down sequence, will shut down now."]
3570    MAV_STATE_POWEROFF = 7,
3571    #[doc = "System is terminating itself (failsafe or commanded)."]
3572    MAV_STATE_FLIGHT_TERMINATION = 8,
3573}
3574impl MavState {
3575    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3576}
3577impl Default for MavState {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3583impl MavSysStatusSensor {
3584    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3585}
3586impl Default for MavSysStatusSensor {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3592impl MavSysStatusSensorExtended {
3593    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3594}
3595impl Default for MavSysStatusSensorExtended {
3596    fn default() -> Self {
3597        Self::DEFAULT
3598    }
3599}
3600#[cfg_attr(feature = "ts", derive(TS))]
3601#[cfg_attr(feature = "ts", ts(export))]
3602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3604#[cfg_attr(feature = "serde", serde(tag = "type"))]
3605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3606#[repr(u32)]
3607pub enum MavTunnelPayloadType {
3608    #[doc = "Encoding of payload unknown."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3628    #[doc = "Registered for STorM32 gimbal controller."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3630    #[doc = "Registered for ModalAI remote OSD protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3632    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3634    #[doc = "Registered for ModalAI vendor use."]
3635    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3636}
3637impl MavTunnelPayloadType {
3638    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3639}
3640impl Default for MavTunnelPayloadType {
3641    fn default() -> Self {
3642        Self::DEFAULT
3643    }
3644}
3645#[cfg_attr(feature = "ts", derive(TS))]
3646#[cfg_attr(feature = "ts", ts(export))]
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3653pub enum MavType {
3654    #[doc = "Generic micro air vehicle"]
3655    MAV_TYPE_GENERIC = 0,
3656    #[doc = "Fixed wing aircraft."]
3657    MAV_TYPE_FIXED_WING = 1,
3658    #[doc = "Quadrotor"]
3659    MAV_TYPE_QUADROTOR = 2,
3660    #[doc = "Coaxial helicopter"]
3661    MAV_TYPE_COAXIAL = 3,
3662    #[doc = "Normal helicopter with tail rotor."]
3663    MAV_TYPE_HELICOPTER = 4,
3664    #[doc = "Ground installation"]
3665    MAV_TYPE_ANTENNA_TRACKER = 5,
3666    #[doc = "Operator control unit / ground control station"]
3667    MAV_TYPE_GCS = 6,
3668    #[doc = "Airship, controlled"]
3669    MAV_TYPE_AIRSHIP = 7,
3670    #[doc = "Free balloon, uncontrolled"]
3671    MAV_TYPE_FREE_BALLOON = 8,
3672    #[doc = "Rocket"]
3673    MAV_TYPE_ROCKET = 9,
3674    #[doc = "Ground rover"]
3675    MAV_TYPE_GROUND_ROVER = 10,
3676    #[doc = "Surface vessel, boat, ship"]
3677    MAV_TYPE_SURFACE_BOAT = 11,
3678    #[doc = "Submarine"]
3679    MAV_TYPE_SUBMARINE = 12,
3680    #[doc = "Hexarotor"]
3681    MAV_TYPE_HEXAROTOR = 13,
3682    #[doc = "Octorotor"]
3683    MAV_TYPE_OCTOROTOR = 14,
3684    #[doc = "Tricopter"]
3685    MAV_TYPE_TRICOPTER = 15,
3686    #[doc = "Flapping wing"]
3687    MAV_TYPE_FLAPPING_WING = 16,
3688    #[doc = "Kite"]
3689    MAV_TYPE_KITE = 17,
3690    #[doc = "Onboard companion controller"]
3691    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3692    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3694    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3695    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3696    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3697    MAV_TYPE_VTOL_TILTROTOR = 21,
3698    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3699    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3700    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3701    MAV_TYPE_VTOL_TAILSITTER = 23,
3702    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3703    MAV_TYPE_VTOL_TILTWING = 24,
3704    #[doc = "VTOL reserved 5"]
3705    MAV_TYPE_VTOL_RESERVED5 = 25,
3706    #[doc = "Gimbal"]
3707    MAV_TYPE_GIMBAL = 26,
3708    #[doc = "ADSB system"]
3709    MAV_TYPE_ADSB = 27,
3710    #[doc = "Steerable, nonrigid airfoil"]
3711    MAV_TYPE_PARAFOIL = 28,
3712    #[doc = "Dodecarotor"]
3713    MAV_TYPE_DODECAROTOR = 29,
3714    #[doc = "Camera"]
3715    MAV_TYPE_CAMERA = 30,
3716    #[doc = "Charging station"]
3717    MAV_TYPE_CHARGING_STATION = 31,
3718    #[doc = "FLARM collision avoidance system"]
3719    MAV_TYPE_FLARM = 32,
3720    #[doc = "Servo"]
3721    MAV_TYPE_SERVO = 33,
3722    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3723    MAV_TYPE_ODID = 34,
3724    #[doc = "Decarotor"]
3725    MAV_TYPE_DECAROTOR = 35,
3726    #[doc = "Battery"]
3727    MAV_TYPE_BATTERY = 36,
3728    #[doc = "Parachute"]
3729    MAV_TYPE_PARACHUTE = 37,
3730    #[doc = "Log"]
3731    MAV_TYPE_LOG = 38,
3732    #[doc = "OSD"]
3733    MAV_TYPE_OSD = 39,
3734    #[doc = "IMU"]
3735    MAV_TYPE_IMU = 40,
3736    #[doc = "GPS"]
3737    MAV_TYPE_GPS = 41,
3738    #[doc = "Winch"]
3739    MAV_TYPE_WINCH = 42,
3740    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3741    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3742    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3743    MAV_TYPE_ILLUMINATOR = 44,
3744    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3745    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3746}
3747impl MavType {
3748    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3749}
3750impl Default for MavType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "Enumeration of VTOL states"]
3763pub enum MavVtolState {
3764    #[doc = "MAV is not configured as VTOL"]
3765    MAV_VTOL_STATE_UNDEFINED = 0,
3766    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3767    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3768    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3769    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3770    #[doc = "VTOL is in multicopter state"]
3771    MAV_VTOL_STATE_MC = 3,
3772    #[doc = "VTOL is in fixed-wing state"]
3773    MAV_VTOL_STATE_FW = 4,
3774}
3775impl MavVtolState {
3776    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3777}
3778impl Default for MavVtolState {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3784impl MavWinchStatusFlag {
3785    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3786}
3787impl Default for MavWinchStatusFlag {
3788    fn default() -> Self {
3789        Self::DEFAULT
3790    }
3791}
3792#[cfg_attr(feature = "ts", derive(TS))]
3793#[cfg_attr(feature = "ts", ts(export))]
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799pub enum MavlinkDataStreamType {
3800    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3801    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3802    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3803    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3804    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3805    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3806}
3807impl MavlinkDataStreamType {
3808    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3809}
3810impl Default for MavlinkDataStreamType {
3811    fn default() -> Self {
3812        Self::DEFAULT
3813    }
3814}
3815#[cfg_attr(feature = "ts", derive(TS))]
3816#[cfg_attr(feature = "ts", ts(export))]
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3823pub enum MissionState {
3824    #[doc = "The mission status reporting is not supported."]
3825    MISSION_STATE_UNKNOWN = 0,
3826    #[doc = "No mission on the vehicle."]
3827    MISSION_STATE_NO_MISSION = 1,
3828    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3829    MISSION_STATE_NOT_STARTED = 2,
3830    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3831    MISSION_STATE_ACTIVE = 3,
3832    #[doc = "Mission is paused when in auto mode."]
3833    MISSION_STATE_PAUSED = 4,
3834    #[doc = "Mission has executed all mission items."]
3835    MISSION_STATE_COMPLETE = 5,
3836}
3837impl MissionState {
3838    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3839}
3840impl Default for MissionState {
3841    fn default() -> Self {
3842        Self::DEFAULT
3843    }
3844}
3845#[cfg_attr(feature = "ts", derive(TS))]
3846#[cfg_attr(feature = "ts", ts(export))]
3847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3849#[cfg_attr(feature = "serde", serde(tag = "type"))]
3850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3851#[repr(u32)]
3852#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3853pub enum MotorTestOrder {
3854    #[doc = "Default autopilot motor test method."]
3855    MOTOR_TEST_ORDER_DEFAULT = 0,
3856    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3857    MOTOR_TEST_ORDER_SEQUENCE = 1,
3858    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3859    MOTOR_TEST_ORDER_BOARD = 2,
3860}
3861impl MotorTestOrder {
3862    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3863}
3864impl Default for MotorTestOrder {
3865    fn default() -> Self {
3866        Self::DEFAULT
3867    }
3868}
3869#[cfg_attr(feature = "ts", derive(TS))]
3870#[cfg_attr(feature = "ts", ts(export))]
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3877pub enum MotorTestThrottleType {
3878    #[doc = "Throttle as a percentage (0 ~ 100)"]
3879    MOTOR_TEST_THROTTLE_PERCENT = 0,
3880    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3881    MOTOR_TEST_THROTTLE_PWM = 1,
3882    #[doc = "Throttle pass-through from pilot's transmitter."]
3883    MOTOR_TEST_THROTTLE_PILOT = 2,
3884    #[doc = "Per-motor compass calibration test."]
3885    MOTOR_TEST_COMPASS_CAL = 3,
3886}
3887impl MotorTestThrottleType {
3888    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3889}
3890impl Default for MotorTestThrottleType {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902pub enum NavVtolLandOptions {
3903    #[doc = "Default autopilot landing behaviour."]
3904    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3905    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3906    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3907    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3908    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3909}
3910impl NavVtolLandOptions {
3911    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3912}
3913impl Default for NavVtolLandOptions {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[cfg_attr(feature = "ts", derive(TS))]
3919#[cfg_attr(feature = "ts", ts(export))]
3920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3922#[cfg_attr(feature = "serde", serde(tag = "type"))]
3923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3924#[repr(u32)]
3925#[doc = "Yaw behaviour during orbit flight."]
3926pub enum OrbitYawBehaviour {
3927    #[doc = "Vehicle front points to the center (default)."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3929    #[doc = "Vehicle front holds heading when message received."]
3930    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3931    #[doc = "Yaw uncontrolled."]
3932    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3933    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3934    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3935    #[doc = "Yaw controlled by RC input."]
3936    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3937    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3938    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3939}
3940impl OrbitYawBehaviour {
3941    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3942}
3943impl Default for OrbitYawBehaviour {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[cfg_attr(feature = "ts", derive(TS))]
3949#[cfg_attr(feature = "ts", ts(export))]
3950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3952#[cfg_attr(feature = "serde", serde(tag = "type"))]
3953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3954#[repr(u32)]
3955#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3956pub enum ParachuteAction {
3957    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3958    PARACHUTE_DISABLE = 0,
3959    #[doc = "Enable auto-release of parachute."]
3960    PARACHUTE_ENABLE = 1,
3961    #[doc = "Release parachute and kill motors."]
3962    PARACHUTE_RELEASE = 2,
3963}
3964impl ParachuteAction {
3965    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3966}
3967impl Default for ParachuteAction {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "Result from PARAM_EXT_SET message."]
3980pub enum ParamAck {
3981    #[doc = "Parameter value ACCEPTED and SET"]
3982    PARAM_ACK_ACCEPTED = 0,
3983    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3984    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3985    #[doc = "Parameter failed to set"]
3986    PARAM_ACK_FAILED = 2,
3987    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3988    PARAM_ACK_IN_PROGRESS = 3,
3989}
3990impl ParamAck {
3991    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3992}
3993impl Default for ParamAck {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3999impl PositionTargetTypemask {
4000    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4001}
4002impl Default for PositionTargetTypemask {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[cfg_attr(feature = "ts", derive(TS))]
4008#[cfg_attr(feature = "ts", ts(export))]
4009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4011#[cfg_attr(feature = "serde", serde(tag = "type"))]
4012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4013#[repr(u32)]
4014#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4015pub enum PrecisionLandMode {
4016    #[doc = "Normal (non-precision) landing."]
4017    PRECISION_LAND_MODE_DISABLED = 0,
4018    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4019    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4020    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4021    PRECISION_LAND_MODE_REQUIRED = 2,
4022}
4023impl PrecisionLandMode {
4024    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4025}
4026impl Default for PrecisionLandMode {
4027    fn default() -> Self {
4028        Self::DEFAULT
4029    }
4030}
4031#[cfg_attr(feature = "ts", derive(TS))]
4032#[cfg_attr(feature = "ts", ts(export))]
4033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4035#[cfg_attr(feature = "serde", serde(tag = "type"))]
4036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4037#[repr(u32)]
4038#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4039pub enum PreflightStorageMissionAction {
4040    #[doc = "Read current mission data from persistent storage"]
4041    MISSION_READ_PERSISTENT = 0,
4042    #[doc = "Write current mission data to persistent storage"]
4043    MISSION_WRITE_PERSISTENT = 1,
4044    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4045    MISSION_RESET_DEFAULT = 2,
4046}
4047impl PreflightStorageMissionAction {
4048    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4049}
4050impl Default for PreflightStorageMissionAction {
4051    fn default() -> Self {
4052        Self::DEFAULT
4053    }
4054}
4055#[cfg_attr(feature = "ts", derive(TS))]
4056#[cfg_attr(feature = "ts", ts(export))]
4057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4059#[cfg_attr(feature = "serde", serde(tag = "type"))]
4060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4061#[repr(u32)]
4062#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4063pub enum PreflightStorageParameterAction {
4064    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4065    PARAM_READ_PERSISTENT = 0,
4066    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4067    PARAM_WRITE_PERSISTENT = 1,
4068    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4069    PARAM_RESET_CONFIG_DEFAULT = 2,
4070    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4071    PARAM_RESET_SENSOR_DEFAULT = 3,
4072    #[doc = "Reset all parameters, including operation counters, to default values"]
4073    PARAM_RESET_ALL_DEFAULT = 4,
4074}
4075impl PreflightStorageParameterAction {
4076    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4077}
4078impl Default for PreflightStorageParameterAction {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4091pub enum RcSubType {
4092    #[doc = "Spektrum DSM2"]
4093    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4094    #[doc = "Spektrum DSMX"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4096    #[doc = "Spektrum DSMX8"]
4097    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4098}
4099impl RcSubType {
4100    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4101}
4102impl Default for RcSubType {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4115pub enum RcType {
4116    #[doc = "Spektrum"]
4117    RC_TYPE_SPEKTRUM = 0,
4118    #[doc = "CRSF"]
4119    RC_TYPE_CRSF = 1,
4120}
4121impl RcType {
4122    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4123}
4124impl Default for RcType {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4137pub enum RebootShutdownConditions {
4138    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4139    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4140    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4141    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4142}
4143impl RebootShutdownConditions {
4144    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4145}
4146impl Default for RebootShutdownConditions {
4147    fn default() -> Self {
4148        Self::DEFAULT
4149    }
4150}
4151#[cfg_attr(feature = "ts", derive(TS))]
4152#[cfg_attr(feature = "ts", ts(export))]
4153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4155#[cfg_attr(feature = "serde", serde(tag = "type"))]
4156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4157#[repr(u32)]
4158#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4159pub enum RtkBaselineCoordinateSystem {
4160    #[doc = "Earth-centered, Earth-fixed"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4162    #[doc = "RTK basestation centered, north, east, down"]
4163    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4164}
4165impl RtkBaselineCoordinateSystem {
4166    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4167}
4168impl Default for RtkBaselineCoordinateSystem {
4169    fn default() -> Self {
4170        Self::DEFAULT
4171    }
4172}
4173#[cfg_attr(feature = "ts", derive(TS))]
4174#[cfg_attr(feature = "ts", ts(export))]
4175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4177#[cfg_attr(feature = "serde", serde(tag = "type"))]
4178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4179#[repr(u32)]
4180#[doc = "Possible safety switch states."]
4181pub enum SafetySwitchState {
4182    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4183    SAFETY_SWITCH_STATE_SAFE = 0,
4184    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4185    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4186}
4187impl SafetySwitchState {
4188    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4189}
4190impl Default for SafetySwitchState {
4191    fn default() -> Self {
4192        Self::DEFAULT
4193    }
4194}
4195#[cfg_attr(feature = "ts", derive(TS))]
4196#[cfg_attr(feature = "ts", ts(export))]
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "SERIAL_CONTROL device types"]
4203pub enum SerialControlDev {
4204    #[doc = "First telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM1 = 0,
4206    #[doc = "Second telemetry port"]
4207    SERIAL_CONTROL_DEV_TELEM2 = 1,
4208    #[doc = "First GPS port"]
4209    SERIAL_CONTROL_DEV_GPS1 = 2,
4210    #[doc = "Second GPS port"]
4211    SERIAL_CONTROL_DEV_GPS2 = 3,
4212    #[doc = "system shell"]
4213    SERIAL_CONTROL_DEV_SHELL = 10,
4214    #[doc = "SERIAL0"]
4215    SERIAL_CONTROL_SERIAL0 = 100,
4216    #[doc = "SERIAL1"]
4217    SERIAL_CONTROL_SERIAL1 = 101,
4218    #[doc = "SERIAL2"]
4219    SERIAL_CONTROL_SERIAL2 = 102,
4220    #[doc = "SERIAL3"]
4221    SERIAL_CONTROL_SERIAL3 = 103,
4222    #[doc = "SERIAL4"]
4223    SERIAL_CONTROL_SERIAL4 = 104,
4224    #[doc = "SERIAL5"]
4225    SERIAL_CONTROL_SERIAL5 = 105,
4226    #[doc = "SERIAL6"]
4227    SERIAL_CONTROL_SERIAL6 = 106,
4228    #[doc = "SERIAL7"]
4229    SERIAL_CONTROL_SERIAL7 = 107,
4230    #[doc = "SERIAL8"]
4231    SERIAL_CONTROL_SERIAL8 = 108,
4232    #[doc = "SERIAL9"]
4233    SERIAL_CONTROL_SERIAL9 = 109,
4234}
4235impl SerialControlDev {
4236    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4237}
4238impl Default for SerialControlDev {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4244impl SerialControlFlag {
4245    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4246}
4247impl Default for SerialControlFlag {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4260pub enum SetFocusType {
4261    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4262    FOCUS_TYPE_STEP = 0,
4263    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4264    FOCUS_TYPE_CONTINUOUS = 1,
4265    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4266    FOCUS_TYPE_RANGE = 2,
4267    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4268    FOCUS_TYPE_METERS = 3,
4269    #[doc = "Focus automatically."]
4270    FOCUS_TYPE_AUTO = 4,
4271    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4272    FOCUS_TYPE_AUTO_SINGLE = 5,
4273    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4274    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4275}
4276impl SetFocusType {
4277    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4278}
4279impl Default for SetFocusType {
4280    fn default() -> Self {
4281        Self::DEFAULT
4282    }
4283}
4284#[cfg_attr(feature = "ts", derive(TS))]
4285#[cfg_attr(feature = "ts", ts(export))]
4286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4288#[cfg_attr(feature = "serde", serde(tag = "type"))]
4289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4290#[repr(u32)]
4291#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4292pub enum SpeedType {
4293    #[doc = "Airspeed"]
4294    SPEED_TYPE_AIRSPEED = 0,
4295    #[doc = "Groundspeed"]
4296    SPEED_TYPE_GROUNDSPEED = 1,
4297    #[doc = "Climb speed"]
4298    SPEED_TYPE_CLIMB_SPEED = 2,
4299    #[doc = "Descent speed"]
4300    SPEED_TYPE_DESCENT_SPEED = 3,
4301}
4302impl SpeedType {
4303    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4304}
4305impl Default for SpeedType {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[cfg_attr(feature = "ts", derive(TS))]
4311#[cfg_attr(feature = "ts", ts(export))]
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "Flags to indicate the status of camera storage."]
4318pub enum StorageStatus {
4319    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4320    STORAGE_STATUS_EMPTY = 0,
4321    #[doc = "Storage present but unformatted."]
4322    STORAGE_STATUS_UNFORMATTED = 1,
4323    #[doc = "Storage present and ready."]
4324    STORAGE_STATUS_READY = 2,
4325    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4326    STORAGE_STATUS_NOT_SUPPORTED = 3,
4327}
4328impl StorageStatus {
4329    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4330}
4331impl Default for StorageStatus {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Flags to indicate the type of storage."]
4344pub enum StorageType {
4345    #[doc = "Storage type is not known."]
4346    STORAGE_TYPE_UNKNOWN = 0,
4347    #[doc = "Storage type is USB device."]
4348    STORAGE_TYPE_USB_STICK = 1,
4349    #[doc = "Storage type is SD card."]
4350    STORAGE_TYPE_SD = 2,
4351    #[doc = "Storage type is microSD card."]
4352    STORAGE_TYPE_MICROSD = 3,
4353    #[doc = "Storage type is CFast."]
4354    STORAGE_TYPE_CF = 4,
4355    #[doc = "Storage type is CFexpress."]
4356    STORAGE_TYPE_CFE = 5,
4357    #[doc = "Storage type is XQD."]
4358    STORAGE_TYPE_XQD = 6,
4359    #[doc = "Storage type is HD mass storage type."]
4360    STORAGE_TYPE_HD = 7,
4361    #[doc = "Storage type is other, not listed type."]
4362    STORAGE_TYPE_OTHER = 254,
4363}
4364impl StorageType {
4365    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4366}
4367impl Default for StorageType {
4368    fn default() -> Self {
4369        Self::DEFAULT
4370    }
4371}
4372bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4373impl StorageUsageFlag {
4374    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4375}
4376impl Default for StorageUsageFlag {
4377    fn default() -> Self {
4378        Self::DEFAULT
4379    }
4380}
4381#[cfg_attr(feature = "ts", derive(TS))]
4382#[cfg_attr(feature = "ts", ts(export))]
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4389pub enum TuneFormat {
4390    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4391    TUNE_FORMAT_QBASIC1_1 = 1,
4392    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4393    TUNE_FORMAT_MML_MODERN = 2,
4394}
4395impl TuneFormat {
4396    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4397}
4398impl Default for TuneFormat {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[cfg_attr(feature = "ts", derive(TS))]
4404#[cfg_attr(feature = "ts", ts(export))]
4405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4407#[cfg_attr(feature = "serde", serde(tag = "type"))]
4408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4409#[repr(u32)]
4410#[doc = "Generalized UAVCAN node health"]
4411pub enum UavcanNodeHealth {
4412    #[doc = "The node is functioning properly."]
4413    UAVCAN_NODE_HEALTH_OK = 0,
4414    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4415    UAVCAN_NODE_HEALTH_WARNING = 1,
4416    #[doc = "The node has encountered a major failure."]
4417    UAVCAN_NODE_HEALTH_ERROR = 2,
4418    #[doc = "The node has suffered a fatal malfunction."]
4419    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4420}
4421impl UavcanNodeHealth {
4422    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4423}
4424impl Default for UavcanNodeHealth {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429#[cfg_attr(feature = "ts", derive(TS))]
4430#[cfg_attr(feature = "ts", ts(export))]
4431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4433#[cfg_attr(feature = "serde", serde(tag = "type"))]
4434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4435#[repr(u32)]
4436#[doc = "Generalized UAVCAN node mode"]
4437pub enum UavcanNodeMode {
4438    #[doc = "The node is performing its primary functions."]
4439    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4440    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4441    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4442    #[doc = "The node is under maintenance."]
4443    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4444    #[doc = "The node is in the process of updating its software."]
4445    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4446    #[doc = "The node is no longer available online."]
4447    UAVCAN_NODE_MODE_OFFLINE = 7,
4448}
4449impl UavcanNodeMode {
4450    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4451}
4452impl Default for UavcanNodeMode {
4453    fn default() -> Self {
4454        Self::DEFAULT
4455    }
4456}
4457bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4458impl UtmDataAvailFlags {
4459    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4460}
4461impl Default for UtmDataAvailFlags {
4462    fn default() -> Self {
4463        Self::DEFAULT
4464    }
4465}
4466#[cfg_attr(feature = "ts", derive(TS))]
4467#[cfg_attr(feature = "ts", ts(export))]
4468#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "serde", serde(tag = "type"))]
4471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4472#[repr(u32)]
4473#[doc = "Airborne status of UAS."]
4474pub enum UtmFlightState {
4475    #[doc = "The flight state can't be determined."]
4476    UTM_FLIGHT_STATE_UNKNOWN = 1,
4477    #[doc = "UAS on ground."]
4478    UTM_FLIGHT_STATE_GROUND = 2,
4479    #[doc = "UAS airborne."]
4480    UTM_FLIGHT_STATE_AIRBORNE = 3,
4481    #[doc = "UAS is in an emergency flight state."]
4482    UTM_FLIGHT_STATE_EMERGENCY = 16,
4483    #[doc = "UAS has no active controls."]
4484    UTM_FLIGHT_STATE_NOCTRL = 32,
4485}
4486impl UtmFlightState {
4487    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4488}
4489impl Default for UtmFlightState {
4490    fn default() -> Self {
4491        Self::DEFAULT
4492    }
4493}
4494#[cfg_attr(feature = "ts", derive(TS))]
4495#[cfg_attr(feature = "ts", ts(export))]
4496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4498#[cfg_attr(feature = "serde", serde(tag = "type"))]
4499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4500#[repr(u32)]
4501#[doc = "Video stream encodings"]
4502pub enum VideoStreamEncoding {
4503    #[doc = "Stream encoding is unknown"]
4504    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4505    #[doc = "Stream encoding is H.264"]
4506    VIDEO_STREAM_ENCODING_H264 = 1,
4507    #[doc = "Stream encoding is H.265"]
4508    VIDEO_STREAM_ENCODING_H265 = 2,
4509}
4510impl VideoStreamEncoding {
4511    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4512}
4513impl Default for VideoStreamEncoding {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4519impl VideoStreamStatusFlags {
4520    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4521}
4522impl Default for VideoStreamStatusFlags {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527#[cfg_attr(feature = "ts", derive(TS))]
4528#[cfg_attr(feature = "ts", ts(export))]
4529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4531#[cfg_attr(feature = "serde", serde(tag = "type"))]
4532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4533#[repr(u32)]
4534#[doc = "Video stream types"]
4535pub enum VideoStreamType {
4536    #[doc = "Stream is RTSP"]
4537    VIDEO_STREAM_TYPE_RTSP = 0,
4538    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4539    VIDEO_STREAM_TYPE_RTPUDP = 1,
4540    #[doc = "Stream is MPEG on TCP"]
4541    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4542    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4543    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4544}
4545impl VideoStreamType {
4546    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4547}
4548impl Default for VideoStreamType {
4549    fn default() -> Self {
4550        Self::DEFAULT
4551    }
4552}
4553#[cfg_attr(feature = "ts", derive(TS))]
4554#[cfg_attr(feature = "ts", ts(export))]
4555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4557#[cfg_attr(feature = "serde", serde(tag = "type"))]
4558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4559#[repr(u32)]
4560#[doc = "Direction of VTOL transition"]
4561pub enum VtolTransitionHeading {
4562    #[doc = "Respect the heading configuration of the vehicle."]
4563    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4564    #[doc = "Use the heading pointing towards the next waypoint."]
4565    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4566    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4567    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4568    #[doc = "Use the specified heading in parameter 4."]
4569    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4570    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4571    VTOL_TRANSITION_HEADING_ANY = 4,
4572}
4573impl VtolTransitionHeading {
4574    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4575}
4576impl Default for VtolTransitionHeading {
4577    fn default() -> Self {
4578        Self::DEFAULT
4579    }
4580}
4581#[cfg_attr(feature = "ts", derive(TS))]
4582#[cfg_attr(feature = "ts", ts(export))]
4583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4585#[cfg_attr(feature = "serde", serde(tag = "type"))]
4586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4587#[repr(u32)]
4588#[doc = "WiFi Mode."]
4589pub enum WifiConfigApMode {
4590    #[doc = "WiFi mode is undefined."]
4591    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4592    #[doc = "WiFi configured as an access point."]
4593    WIFI_CONFIG_AP_MODE_AP = 1,
4594    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4595    WIFI_CONFIG_AP_MODE_STATION = 2,
4596    #[doc = "WiFi disabled."]
4597    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4598}
4599impl WifiConfigApMode {
4600    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4601}
4602impl Default for WifiConfigApMode {
4603    fn default() -> Self {
4604        Self::DEFAULT
4605    }
4606}
4607#[cfg_attr(feature = "ts", derive(TS))]
4608#[cfg_attr(feature = "ts", ts(export))]
4609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4611#[cfg_attr(feature = "serde", serde(tag = "type"))]
4612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4613#[repr(u32)]
4614#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4615pub enum WifiConfigApResponse {
4616    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4617    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4618    #[doc = "Changes accepted."]
4619    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4620    #[doc = "Changes rejected."]
4621    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4622    #[doc = "Invalid Mode."]
4623    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4624    #[doc = "Invalid SSID."]
4625    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4626    #[doc = "Invalid Password."]
4627    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4628}
4629impl WifiConfigApResponse {
4630    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4631}
4632impl Default for WifiConfigApResponse {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Winch actions."]
4645pub enum WinchActions {
4646    #[doc = "Allow motor to freewheel."]
4647    WINCH_RELAXED = 0,
4648    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4649    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4650    #[doc = "Wind or unwind line at specified rate."]
4651    WINCH_RATE_CONTROL = 2,
4652    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_LOCK = 3,
4654    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_DELIVER = 4,
4656    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_HOLD = 5,
4658    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_RETRACT = 6,
4660    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_LOAD_LINE = 7,
4662    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4663    WINCH_ABANDON_LINE = 8,
4664    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4665    WINCH_LOAD_PAYLOAD = 9,
4666}
4667impl WinchActions {
4668    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4669}
4670impl Default for WinchActions {
4671    fn default() -> Self {
4672        Self::DEFAULT
4673    }
4674}
4675#[doc = "Set the vehicle attitude and body angular rates."]
4676#[doc = ""]
4677#[doc = "ID: 140"]
4678#[derive(Debug, Clone, PartialEq)]
4679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4681#[cfg_attr(feature = "ts", derive(TS))]
4682#[cfg_attr(feature = "ts", ts(export))]
4683pub struct ACTUATOR_CONTROL_TARGET_DATA {
4684    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4685    pub time_usec: u64,
4686    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4689    pub controls: [f32; 8],
4690    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4691    pub group_mlx: u8,
4692}
4693impl ACTUATOR_CONTROL_TARGET_DATA {
4694    pub const ENCODED_LEN: usize = 41usize;
4695    pub const DEFAULT: Self = Self {
4696        time_usec: 0_u64,
4697        controls: [0.0_f32; 8usize],
4698        group_mlx: 0_u8,
4699    };
4700    #[cfg(feature = "arbitrary")]
4701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4702        use arbitrary::{Arbitrary, Unstructured};
4703        let mut buf = [0u8; 1024];
4704        rng.fill_bytes(&mut buf);
4705        let mut unstructured = Unstructured::new(&buf);
4706        Self::arbitrary(&mut unstructured).unwrap_or_default()
4707    }
4708}
4709impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4710    fn default() -> Self {
4711        Self::DEFAULT.clone()
4712    }
4713}
4714impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4715    type Message = MavMessage;
4716    const ID: u32 = 140u32;
4717    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4718    const EXTRA_CRC: u8 = 181u8;
4719    const ENCODED_LEN: usize = 41usize;
4720    fn deser(
4721        _version: MavlinkVersion,
4722        __input: &[u8],
4723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4724        let avail_len = __input.len();
4725        let mut payload_buf = [0; Self::ENCODED_LEN];
4726        let mut buf = if avail_len < Self::ENCODED_LEN {
4727            payload_buf[0..avail_len].copy_from_slice(__input);
4728            Bytes::new(&payload_buf)
4729        } else {
4730            Bytes::new(__input)
4731        };
4732        let mut __struct = Self::default();
4733        __struct.time_usec = buf.get_u64_le();
4734        for v in &mut __struct.controls {
4735            let val = buf.get_f32_le();
4736            *v = val;
4737        }
4738        __struct.group_mlx = buf.get_u8();
4739        Ok(__struct)
4740    }
4741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4742        let mut __tmp = BytesMut::new(bytes);
4743        #[allow(clippy::absurd_extreme_comparisons)]
4744        #[allow(unused_comparisons)]
4745        if __tmp.remaining() < Self::ENCODED_LEN {
4746            panic!(
4747                "buffer is too small (need {} bytes, but got {})",
4748                Self::ENCODED_LEN,
4749                __tmp.remaining(),
4750            )
4751        }
4752        __tmp.put_u64_le(self.time_usec);
4753        for val in &self.controls {
4754            __tmp.put_f32_le(*val);
4755        }
4756        __tmp.put_u8(self.group_mlx);
4757        if matches!(version, MavlinkVersion::V2) {
4758            let len = __tmp.len();
4759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4760        } else {
4761            __tmp.len()
4762        }
4763    }
4764}
4765#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4766#[doc = ""]
4767#[doc = "ID: 375"]
4768#[derive(Debug, Clone, PartialEq)]
4769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4771#[cfg_attr(feature = "ts", derive(TS))]
4772#[cfg_attr(feature = "ts", ts(export))]
4773pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4774    #[doc = "Timestamp (since system boot)."]
4775    pub time_usec: u64,
4776    #[doc = "Active outputs"]
4777    pub active: u32,
4778    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4781    pub actuator: [f32; 32],
4782}
4783impl ACTUATOR_OUTPUT_STATUS_DATA {
4784    pub const ENCODED_LEN: usize = 140usize;
4785    pub const DEFAULT: Self = Self {
4786        time_usec: 0_u64,
4787        active: 0_u32,
4788        actuator: [0.0_f32; 32usize],
4789    };
4790    #[cfg(feature = "arbitrary")]
4791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4792        use arbitrary::{Arbitrary, Unstructured};
4793        let mut buf = [0u8; 1024];
4794        rng.fill_bytes(&mut buf);
4795        let mut unstructured = Unstructured::new(&buf);
4796        Self::arbitrary(&mut unstructured).unwrap_or_default()
4797    }
4798}
4799impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4800    fn default() -> Self {
4801        Self::DEFAULT.clone()
4802    }
4803}
4804impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4805    type Message = MavMessage;
4806    const ID: u32 = 375u32;
4807    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4808    const EXTRA_CRC: u8 = 251u8;
4809    const ENCODED_LEN: usize = 140usize;
4810    fn deser(
4811        _version: MavlinkVersion,
4812        __input: &[u8],
4813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4814        let avail_len = __input.len();
4815        let mut payload_buf = [0; Self::ENCODED_LEN];
4816        let mut buf = if avail_len < Self::ENCODED_LEN {
4817            payload_buf[0..avail_len].copy_from_slice(__input);
4818            Bytes::new(&payload_buf)
4819        } else {
4820            Bytes::new(__input)
4821        };
4822        let mut __struct = Self::default();
4823        __struct.time_usec = buf.get_u64_le();
4824        __struct.active = buf.get_u32_le();
4825        for v in &mut __struct.actuator {
4826            let val = buf.get_f32_le();
4827            *v = val;
4828        }
4829        Ok(__struct)
4830    }
4831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4832        let mut __tmp = BytesMut::new(bytes);
4833        #[allow(clippy::absurd_extreme_comparisons)]
4834        #[allow(unused_comparisons)]
4835        if __tmp.remaining() < Self::ENCODED_LEN {
4836            panic!(
4837                "buffer is too small (need {} bytes, but got {})",
4838                Self::ENCODED_LEN,
4839                __tmp.remaining(),
4840            )
4841        }
4842        __tmp.put_u64_le(self.time_usec);
4843        __tmp.put_u32_le(self.active);
4844        for val in &self.actuator {
4845            __tmp.put_f32_le(*val);
4846        }
4847        if matches!(version, MavlinkVersion::V2) {
4848            let len = __tmp.len();
4849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4850        } else {
4851            __tmp.len()
4852        }
4853    }
4854}
4855#[doc = "The location and information of an ADSB vehicle."]
4856#[doc = ""]
4857#[doc = "ID: 246"]
4858#[derive(Debug, Clone, PartialEq)]
4859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4861#[cfg_attr(feature = "ts", derive(TS))]
4862#[cfg_attr(feature = "ts", ts(export))]
4863pub struct ADSB_VEHICLE_DATA {
4864    #[doc = "ICAO address"]
4865    pub ICAO_address: u32,
4866    #[doc = "Latitude"]
4867    pub lat: i32,
4868    #[doc = "Longitude"]
4869    pub lon: i32,
4870    #[doc = "Altitude(ASL)"]
4871    pub altitude: i32,
4872    #[doc = "Course over ground"]
4873    pub heading: u16,
4874    #[doc = "The horizontal velocity"]
4875    pub hor_velocity: u16,
4876    #[doc = "The vertical velocity. Positive is up"]
4877    pub ver_velocity: i16,
4878    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4879    pub flags: AdsbFlags,
4880    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4881    pub squawk: u16,
4882    #[doc = "ADSB altitude type."]
4883    pub altitude_type: AdsbAltitudeType,
4884    #[doc = "The callsign, 8+null"]
4885    #[cfg_attr(feature = "ts", ts(type = "string"))]
4886    pub callsign: CharArray<9>,
4887    #[doc = "ADSB emitter type."]
4888    pub emitter_type: AdsbEmitterType,
4889    #[doc = "Time since last communication in seconds"]
4890    pub tslc: u8,
4891}
4892impl ADSB_VEHICLE_DATA {
4893    pub const ENCODED_LEN: usize = 38usize;
4894    pub const DEFAULT: Self = Self {
4895        ICAO_address: 0_u32,
4896        lat: 0_i32,
4897        lon: 0_i32,
4898        altitude: 0_i32,
4899        heading: 0_u16,
4900        hor_velocity: 0_u16,
4901        ver_velocity: 0_i16,
4902        flags: AdsbFlags::DEFAULT,
4903        squawk: 0_u16,
4904        altitude_type: AdsbAltitudeType::DEFAULT,
4905        callsign: CharArray::new([0_u8; 9usize]),
4906        emitter_type: AdsbEmitterType::DEFAULT,
4907        tslc: 0_u8,
4908    };
4909    #[cfg(feature = "arbitrary")]
4910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4911        use arbitrary::{Arbitrary, Unstructured};
4912        let mut buf = [0u8; 1024];
4913        rng.fill_bytes(&mut buf);
4914        let mut unstructured = Unstructured::new(&buf);
4915        Self::arbitrary(&mut unstructured).unwrap_or_default()
4916    }
4917}
4918impl Default for ADSB_VEHICLE_DATA {
4919    fn default() -> Self {
4920        Self::DEFAULT.clone()
4921    }
4922}
4923impl MessageData for ADSB_VEHICLE_DATA {
4924    type Message = MavMessage;
4925    const ID: u32 = 246u32;
4926    const NAME: &'static str = "ADSB_VEHICLE";
4927    const EXTRA_CRC: u8 = 184u8;
4928    const ENCODED_LEN: usize = 38usize;
4929    fn deser(
4930        _version: MavlinkVersion,
4931        __input: &[u8],
4932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4933        let avail_len = __input.len();
4934        let mut payload_buf = [0; Self::ENCODED_LEN];
4935        let mut buf = if avail_len < Self::ENCODED_LEN {
4936            payload_buf[0..avail_len].copy_from_slice(__input);
4937            Bytes::new(&payload_buf)
4938        } else {
4939            Bytes::new(__input)
4940        };
4941        let mut __struct = Self::default();
4942        __struct.ICAO_address = buf.get_u32_le();
4943        __struct.lat = buf.get_i32_le();
4944        __struct.lon = buf.get_i32_le();
4945        __struct.altitude = buf.get_i32_le();
4946        __struct.heading = buf.get_u16_le();
4947        __struct.hor_velocity = buf.get_u16_le();
4948        __struct.ver_velocity = buf.get_i16_le();
4949        let tmp = buf.get_u16_le();
4950        __struct.flags =
4951            AdsbFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
4952                flag_type: "AdsbFlags",
4953                value: tmp as u64,
4954            })?;
4955        __struct.squawk = buf.get_u16_le();
4956        let tmp = buf.get_u8();
4957        __struct.altitude_type =
4958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4959                enum_type: "AdsbAltitudeType",
4960                value: tmp as u64,
4961            })?;
4962        let mut tmp = [0_u8; 9usize];
4963        for v in &mut tmp {
4964            *v = buf.get_u8();
4965        }
4966        __struct.callsign = CharArray::new(tmp);
4967        let tmp = buf.get_u8();
4968        __struct.emitter_type =
4969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4970                enum_type: "AdsbEmitterType",
4971                value: tmp as u64,
4972            })?;
4973        __struct.tslc = buf.get_u8();
4974        Ok(__struct)
4975    }
4976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4977        let mut __tmp = BytesMut::new(bytes);
4978        #[allow(clippy::absurd_extreme_comparisons)]
4979        #[allow(unused_comparisons)]
4980        if __tmp.remaining() < Self::ENCODED_LEN {
4981            panic!(
4982                "buffer is too small (need {} bytes, but got {})",
4983                Self::ENCODED_LEN,
4984                __tmp.remaining(),
4985            )
4986        }
4987        __tmp.put_u32_le(self.ICAO_address);
4988        __tmp.put_i32_le(self.lat);
4989        __tmp.put_i32_le(self.lon);
4990        __tmp.put_i32_le(self.altitude);
4991        __tmp.put_u16_le(self.heading);
4992        __tmp.put_u16_le(self.hor_velocity);
4993        __tmp.put_i16_le(self.ver_velocity);
4994        __tmp.put_u16_le(self.flags.bits());
4995        __tmp.put_u16_le(self.squawk);
4996        __tmp.put_u8(self.altitude_type as u8);
4997        for val in &self.callsign {
4998            __tmp.put_u8(*val);
4999        }
5000        __tmp.put_u8(self.emitter_type as u8);
5001        __tmp.put_u8(self.tslc);
5002        if matches!(version, MavlinkVersion::V2) {
5003            let len = __tmp.len();
5004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5005        } else {
5006            __tmp.len()
5007        }
5008    }
5009}
5010#[doc = "The location and information of an AIS vessel."]
5011#[doc = ""]
5012#[doc = "ID: 301"]
5013#[derive(Debug, Clone, PartialEq)]
5014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5016#[cfg_attr(feature = "ts", derive(TS))]
5017#[cfg_attr(feature = "ts", ts(export))]
5018pub struct AIS_VESSEL_DATA {
5019    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5020    pub MMSI: u32,
5021    #[doc = "Latitude"]
5022    pub lat: i32,
5023    #[doc = "Longitude"]
5024    pub lon: i32,
5025    #[doc = "Course over ground"]
5026    pub COG: u16,
5027    #[doc = "True heading"]
5028    pub heading: u16,
5029    #[doc = "Speed over ground"]
5030    pub velocity: u16,
5031    #[doc = "Distance from lat/lon location to bow"]
5032    pub dimension_bow: u16,
5033    #[doc = "Distance from lat/lon location to stern"]
5034    pub dimension_stern: u16,
5035    #[doc = "Time since last communication in seconds"]
5036    pub tslc: u16,
5037    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5038    pub flags: AisFlags,
5039    #[doc = "Turn rate"]
5040    pub turn_rate: i8,
5041    #[doc = "Navigational status"]
5042    pub navigational_status: AisNavStatus,
5043    #[doc = "Type of vessels"]
5044    pub mavtype: AisType,
5045    #[doc = "Distance from lat/lon location to port side"]
5046    pub dimension_port: u8,
5047    #[doc = "Distance from lat/lon location to starboard side"]
5048    pub dimension_starboard: u8,
5049    #[doc = "The vessel callsign"]
5050    #[cfg_attr(feature = "ts", ts(type = "string"))]
5051    pub callsign: CharArray<7>,
5052    #[doc = "The vessel name"]
5053    #[cfg_attr(feature = "ts", ts(type = "string"))]
5054    pub name: CharArray<20>,
5055}
5056impl AIS_VESSEL_DATA {
5057    pub const ENCODED_LEN: usize = 58usize;
5058    pub const DEFAULT: Self = Self {
5059        MMSI: 0_u32,
5060        lat: 0_i32,
5061        lon: 0_i32,
5062        COG: 0_u16,
5063        heading: 0_u16,
5064        velocity: 0_u16,
5065        dimension_bow: 0_u16,
5066        dimension_stern: 0_u16,
5067        tslc: 0_u16,
5068        flags: AisFlags::DEFAULT,
5069        turn_rate: 0_i8,
5070        navigational_status: AisNavStatus::DEFAULT,
5071        mavtype: AisType::DEFAULT,
5072        dimension_port: 0_u8,
5073        dimension_starboard: 0_u8,
5074        callsign: CharArray::new([0_u8; 7usize]),
5075        name: CharArray::new([0_u8; 20usize]),
5076    };
5077    #[cfg(feature = "arbitrary")]
5078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5079        use arbitrary::{Arbitrary, Unstructured};
5080        let mut buf = [0u8; 1024];
5081        rng.fill_bytes(&mut buf);
5082        let mut unstructured = Unstructured::new(&buf);
5083        Self::arbitrary(&mut unstructured).unwrap_or_default()
5084    }
5085}
5086impl Default for AIS_VESSEL_DATA {
5087    fn default() -> Self {
5088        Self::DEFAULT.clone()
5089    }
5090}
5091impl MessageData for AIS_VESSEL_DATA {
5092    type Message = MavMessage;
5093    const ID: u32 = 301u32;
5094    const NAME: &'static str = "AIS_VESSEL";
5095    const EXTRA_CRC: u8 = 243u8;
5096    const ENCODED_LEN: usize = 58usize;
5097    fn deser(
5098        _version: MavlinkVersion,
5099        __input: &[u8],
5100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5101        let avail_len = __input.len();
5102        let mut payload_buf = [0; Self::ENCODED_LEN];
5103        let mut buf = if avail_len < Self::ENCODED_LEN {
5104            payload_buf[0..avail_len].copy_from_slice(__input);
5105            Bytes::new(&payload_buf)
5106        } else {
5107            Bytes::new(__input)
5108        };
5109        let mut __struct = Self::default();
5110        __struct.MMSI = buf.get_u32_le();
5111        __struct.lat = buf.get_i32_le();
5112        __struct.lon = buf.get_i32_le();
5113        __struct.COG = buf.get_u16_le();
5114        __struct.heading = buf.get_u16_le();
5115        __struct.velocity = buf.get_u16_le();
5116        __struct.dimension_bow = buf.get_u16_le();
5117        __struct.dimension_stern = buf.get_u16_le();
5118        __struct.tslc = buf.get_u16_le();
5119        let tmp = buf.get_u16_le();
5120        __struct.flags =
5121            AisFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5122                flag_type: "AisFlags",
5123                value: tmp as u64,
5124            })?;
5125        __struct.turn_rate = buf.get_i8();
5126        let tmp = buf.get_u8();
5127        __struct.navigational_status =
5128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5129                enum_type: "AisNavStatus",
5130                value: tmp as u64,
5131            })?;
5132        let tmp = buf.get_u8();
5133        __struct.mavtype =
5134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5135                enum_type: "AisType",
5136                value: tmp as u64,
5137            })?;
5138        __struct.dimension_port = buf.get_u8();
5139        __struct.dimension_starboard = buf.get_u8();
5140        let mut tmp = [0_u8; 7usize];
5141        for v in &mut tmp {
5142            *v = buf.get_u8();
5143        }
5144        __struct.callsign = CharArray::new(tmp);
5145        let mut tmp = [0_u8; 20usize];
5146        for v in &mut tmp {
5147            *v = buf.get_u8();
5148        }
5149        __struct.name = CharArray::new(tmp);
5150        Ok(__struct)
5151    }
5152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5153        let mut __tmp = BytesMut::new(bytes);
5154        #[allow(clippy::absurd_extreme_comparisons)]
5155        #[allow(unused_comparisons)]
5156        if __tmp.remaining() < Self::ENCODED_LEN {
5157            panic!(
5158                "buffer is too small (need {} bytes, but got {})",
5159                Self::ENCODED_LEN,
5160                __tmp.remaining(),
5161            )
5162        }
5163        __tmp.put_u32_le(self.MMSI);
5164        __tmp.put_i32_le(self.lat);
5165        __tmp.put_i32_le(self.lon);
5166        __tmp.put_u16_le(self.COG);
5167        __tmp.put_u16_le(self.heading);
5168        __tmp.put_u16_le(self.velocity);
5169        __tmp.put_u16_le(self.dimension_bow);
5170        __tmp.put_u16_le(self.dimension_stern);
5171        __tmp.put_u16_le(self.tslc);
5172        __tmp.put_u16_le(self.flags.bits());
5173        __tmp.put_i8(self.turn_rate);
5174        __tmp.put_u8(self.navigational_status as u8);
5175        __tmp.put_u8(self.mavtype as u8);
5176        __tmp.put_u8(self.dimension_port);
5177        __tmp.put_u8(self.dimension_starboard);
5178        for val in &self.callsign {
5179            __tmp.put_u8(*val);
5180        }
5181        for val in &self.name {
5182            __tmp.put_u8(*val);
5183        }
5184        if matches!(version, MavlinkVersion::V2) {
5185            let len = __tmp.len();
5186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5187        } else {
5188            __tmp.len()
5189        }
5190    }
5191}
5192#[doc = "The current system altitude."]
5193#[doc = ""]
5194#[doc = "ID: 141"]
5195#[derive(Debug, Clone, PartialEq)]
5196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5198#[cfg_attr(feature = "ts", derive(TS))]
5199#[cfg_attr(feature = "ts", ts(export))]
5200pub struct ALTITUDE_DATA {
5201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5202    pub time_usec: u64,
5203    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5204    pub altitude_monotonic: f32,
5205    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5206    pub altitude_amsl: f32,
5207    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5208    pub altitude_local: f32,
5209    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5210    pub altitude_relative: f32,
5211    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5212    pub altitude_terrain: f32,
5213    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5214    pub bottom_clearance: f32,
5215}
5216impl ALTITUDE_DATA {
5217    pub const ENCODED_LEN: usize = 32usize;
5218    pub const DEFAULT: Self = Self {
5219        time_usec: 0_u64,
5220        altitude_monotonic: 0.0_f32,
5221        altitude_amsl: 0.0_f32,
5222        altitude_local: 0.0_f32,
5223        altitude_relative: 0.0_f32,
5224        altitude_terrain: 0.0_f32,
5225        bottom_clearance: 0.0_f32,
5226    };
5227    #[cfg(feature = "arbitrary")]
5228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5229        use arbitrary::{Arbitrary, Unstructured};
5230        let mut buf = [0u8; 1024];
5231        rng.fill_bytes(&mut buf);
5232        let mut unstructured = Unstructured::new(&buf);
5233        Self::arbitrary(&mut unstructured).unwrap_or_default()
5234    }
5235}
5236impl Default for ALTITUDE_DATA {
5237    fn default() -> Self {
5238        Self::DEFAULT.clone()
5239    }
5240}
5241impl MessageData for ALTITUDE_DATA {
5242    type Message = MavMessage;
5243    const ID: u32 = 141u32;
5244    const NAME: &'static str = "ALTITUDE";
5245    const EXTRA_CRC: u8 = 47u8;
5246    const ENCODED_LEN: usize = 32usize;
5247    fn deser(
5248        _version: MavlinkVersion,
5249        __input: &[u8],
5250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5251        let avail_len = __input.len();
5252        let mut payload_buf = [0; Self::ENCODED_LEN];
5253        let mut buf = if avail_len < Self::ENCODED_LEN {
5254            payload_buf[0..avail_len].copy_from_slice(__input);
5255            Bytes::new(&payload_buf)
5256        } else {
5257            Bytes::new(__input)
5258        };
5259        let mut __struct = Self::default();
5260        __struct.time_usec = buf.get_u64_le();
5261        __struct.altitude_monotonic = buf.get_f32_le();
5262        __struct.altitude_amsl = buf.get_f32_le();
5263        __struct.altitude_local = buf.get_f32_le();
5264        __struct.altitude_relative = buf.get_f32_le();
5265        __struct.altitude_terrain = buf.get_f32_le();
5266        __struct.bottom_clearance = buf.get_f32_le();
5267        Ok(__struct)
5268    }
5269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5270        let mut __tmp = BytesMut::new(bytes);
5271        #[allow(clippy::absurd_extreme_comparisons)]
5272        #[allow(unused_comparisons)]
5273        if __tmp.remaining() < Self::ENCODED_LEN {
5274            panic!(
5275                "buffer is too small (need {} bytes, but got {})",
5276                Self::ENCODED_LEN,
5277                __tmp.remaining(),
5278            )
5279        }
5280        __tmp.put_u64_le(self.time_usec);
5281        __tmp.put_f32_le(self.altitude_monotonic);
5282        __tmp.put_f32_le(self.altitude_amsl);
5283        __tmp.put_f32_le(self.altitude_local);
5284        __tmp.put_f32_le(self.altitude_relative);
5285        __tmp.put_f32_le(self.altitude_terrain);
5286        __tmp.put_f32_le(self.bottom_clearance);
5287        if matches!(version, MavlinkVersion::V2) {
5288            let len = __tmp.len();
5289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5290        } else {
5291            __tmp.len()
5292        }
5293    }
5294}
5295#[doc = "Array test #0."]
5296#[doc = ""]
5297#[doc = "ID: 17150"]
5298#[derive(Debug, Clone, PartialEq)]
5299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5301#[cfg_attr(feature = "ts", derive(TS))]
5302#[cfg_attr(feature = "ts", ts(export))]
5303pub struct ARRAY_TEST_0_DATA {
5304    #[doc = "Value array"]
5305    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5306    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5307    pub ar_u32: [u32; 4],
5308    #[doc = "Value array"]
5309    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5310    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5311    pub ar_u16: [u16; 4],
5312    #[doc = "Stub field"]
5313    pub v1: u8,
5314    #[doc = "Value array"]
5315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5317    pub ar_i8: [i8; 4],
5318    #[doc = "Value array"]
5319    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5320    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5321    pub ar_u8: [u8; 4],
5322}
5323impl ARRAY_TEST_0_DATA {
5324    pub const ENCODED_LEN: usize = 33usize;
5325    pub const DEFAULT: Self = Self {
5326        ar_u32: [0_u32; 4usize],
5327        ar_u16: [0_u16; 4usize],
5328        v1: 0_u8,
5329        ar_i8: [0_i8; 4usize],
5330        ar_u8: [0_u8; 4usize],
5331    };
5332    #[cfg(feature = "arbitrary")]
5333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5334        use arbitrary::{Arbitrary, Unstructured};
5335        let mut buf = [0u8; 1024];
5336        rng.fill_bytes(&mut buf);
5337        let mut unstructured = Unstructured::new(&buf);
5338        Self::arbitrary(&mut unstructured).unwrap_or_default()
5339    }
5340}
5341impl Default for ARRAY_TEST_0_DATA {
5342    fn default() -> Self {
5343        Self::DEFAULT.clone()
5344    }
5345}
5346impl MessageData for ARRAY_TEST_0_DATA {
5347    type Message = MavMessage;
5348    const ID: u32 = 17150u32;
5349    const NAME: &'static str = "ARRAY_TEST_0";
5350    const EXTRA_CRC: u8 = 26u8;
5351    const ENCODED_LEN: usize = 33usize;
5352    fn deser(
5353        _version: MavlinkVersion,
5354        __input: &[u8],
5355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5356        let avail_len = __input.len();
5357        let mut payload_buf = [0; Self::ENCODED_LEN];
5358        let mut buf = if avail_len < Self::ENCODED_LEN {
5359            payload_buf[0..avail_len].copy_from_slice(__input);
5360            Bytes::new(&payload_buf)
5361        } else {
5362            Bytes::new(__input)
5363        };
5364        let mut __struct = Self::default();
5365        for v in &mut __struct.ar_u32 {
5366            let val = buf.get_u32_le();
5367            *v = val;
5368        }
5369        for v in &mut __struct.ar_u16 {
5370            let val = buf.get_u16_le();
5371            *v = val;
5372        }
5373        __struct.v1 = buf.get_u8();
5374        for v in &mut __struct.ar_i8 {
5375            let val = buf.get_i8();
5376            *v = val;
5377        }
5378        for v in &mut __struct.ar_u8 {
5379            let val = buf.get_u8();
5380            *v = val;
5381        }
5382        Ok(__struct)
5383    }
5384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5385        let mut __tmp = BytesMut::new(bytes);
5386        #[allow(clippy::absurd_extreme_comparisons)]
5387        #[allow(unused_comparisons)]
5388        if __tmp.remaining() < Self::ENCODED_LEN {
5389            panic!(
5390                "buffer is too small (need {} bytes, but got {})",
5391                Self::ENCODED_LEN,
5392                __tmp.remaining(),
5393            )
5394        }
5395        for val in &self.ar_u32 {
5396            __tmp.put_u32_le(*val);
5397        }
5398        for val in &self.ar_u16 {
5399            __tmp.put_u16_le(*val);
5400        }
5401        __tmp.put_u8(self.v1);
5402        for val in &self.ar_i8 {
5403            __tmp.put_i8(*val);
5404        }
5405        for val in &self.ar_u8 {
5406            __tmp.put_u8(*val);
5407        }
5408        if matches!(version, MavlinkVersion::V2) {
5409            let len = __tmp.len();
5410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5411        } else {
5412            __tmp.len()
5413        }
5414    }
5415}
5416#[doc = "Array test #1."]
5417#[doc = ""]
5418#[doc = "ID: 17151"]
5419#[derive(Debug, Clone, PartialEq)]
5420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5422#[cfg_attr(feature = "ts", derive(TS))]
5423#[cfg_attr(feature = "ts", ts(export))]
5424pub struct ARRAY_TEST_1_DATA {
5425    #[doc = "Value array"]
5426    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5427    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5428    pub ar_u32: [u32; 4],
5429}
5430impl ARRAY_TEST_1_DATA {
5431    pub const ENCODED_LEN: usize = 16usize;
5432    pub const DEFAULT: Self = Self {
5433        ar_u32: [0_u32; 4usize],
5434    };
5435    #[cfg(feature = "arbitrary")]
5436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5437        use arbitrary::{Arbitrary, Unstructured};
5438        let mut buf = [0u8; 1024];
5439        rng.fill_bytes(&mut buf);
5440        let mut unstructured = Unstructured::new(&buf);
5441        Self::arbitrary(&mut unstructured).unwrap_or_default()
5442    }
5443}
5444impl Default for ARRAY_TEST_1_DATA {
5445    fn default() -> Self {
5446        Self::DEFAULT.clone()
5447    }
5448}
5449impl MessageData for ARRAY_TEST_1_DATA {
5450    type Message = MavMessage;
5451    const ID: u32 = 17151u32;
5452    const NAME: &'static str = "ARRAY_TEST_1";
5453    const EXTRA_CRC: u8 = 72u8;
5454    const ENCODED_LEN: usize = 16usize;
5455    fn deser(
5456        _version: MavlinkVersion,
5457        __input: &[u8],
5458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5459        let avail_len = __input.len();
5460        let mut payload_buf = [0; Self::ENCODED_LEN];
5461        let mut buf = if avail_len < Self::ENCODED_LEN {
5462            payload_buf[0..avail_len].copy_from_slice(__input);
5463            Bytes::new(&payload_buf)
5464        } else {
5465            Bytes::new(__input)
5466        };
5467        let mut __struct = Self::default();
5468        for v in &mut __struct.ar_u32 {
5469            let val = buf.get_u32_le();
5470            *v = val;
5471        }
5472        Ok(__struct)
5473    }
5474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5475        let mut __tmp = BytesMut::new(bytes);
5476        #[allow(clippy::absurd_extreme_comparisons)]
5477        #[allow(unused_comparisons)]
5478        if __tmp.remaining() < Self::ENCODED_LEN {
5479            panic!(
5480                "buffer is too small (need {} bytes, but got {})",
5481                Self::ENCODED_LEN,
5482                __tmp.remaining(),
5483            )
5484        }
5485        for val in &self.ar_u32 {
5486            __tmp.put_u32_le(*val);
5487        }
5488        if matches!(version, MavlinkVersion::V2) {
5489            let len = __tmp.len();
5490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5491        } else {
5492            __tmp.len()
5493        }
5494    }
5495}
5496#[doc = "Array test #3."]
5497#[doc = ""]
5498#[doc = "ID: 17153"]
5499#[derive(Debug, Clone, PartialEq)]
5500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5502#[cfg_attr(feature = "ts", derive(TS))]
5503#[cfg_attr(feature = "ts", ts(export))]
5504pub struct ARRAY_TEST_3_DATA {
5505    #[doc = "Value array"]
5506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5507    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5508    pub ar_u32: [u32; 4],
5509    #[doc = "Stub field"]
5510    pub v: u8,
5511}
5512impl ARRAY_TEST_3_DATA {
5513    pub const ENCODED_LEN: usize = 17usize;
5514    pub const DEFAULT: Self = Self {
5515        ar_u32: [0_u32; 4usize],
5516        v: 0_u8,
5517    };
5518    #[cfg(feature = "arbitrary")]
5519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5520        use arbitrary::{Arbitrary, Unstructured};
5521        let mut buf = [0u8; 1024];
5522        rng.fill_bytes(&mut buf);
5523        let mut unstructured = Unstructured::new(&buf);
5524        Self::arbitrary(&mut unstructured).unwrap_or_default()
5525    }
5526}
5527impl Default for ARRAY_TEST_3_DATA {
5528    fn default() -> Self {
5529        Self::DEFAULT.clone()
5530    }
5531}
5532impl MessageData for ARRAY_TEST_3_DATA {
5533    type Message = MavMessage;
5534    const ID: u32 = 17153u32;
5535    const NAME: &'static str = "ARRAY_TEST_3";
5536    const EXTRA_CRC: u8 = 19u8;
5537    const ENCODED_LEN: usize = 17usize;
5538    fn deser(
5539        _version: MavlinkVersion,
5540        __input: &[u8],
5541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5542        let avail_len = __input.len();
5543        let mut payload_buf = [0; Self::ENCODED_LEN];
5544        let mut buf = if avail_len < Self::ENCODED_LEN {
5545            payload_buf[0..avail_len].copy_from_slice(__input);
5546            Bytes::new(&payload_buf)
5547        } else {
5548            Bytes::new(__input)
5549        };
5550        let mut __struct = Self::default();
5551        for v in &mut __struct.ar_u32 {
5552            let val = buf.get_u32_le();
5553            *v = val;
5554        }
5555        __struct.v = buf.get_u8();
5556        Ok(__struct)
5557    }
5558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5559        let mut __tmp = BytesMut::new(bytes);
5560        #[allow(clippy::absurd_extreme_comparisons)]
5561        #[allow(unused_comparisons)]
5562        if __tmp.remaining() < Self::ENCODED_LEN {
5563            panic!(
5564                "buffer is too small (need {} bytes, but got {})",
5565                Self::ENCODED_LEN,
5566                __tmp.remaining(),
5567            )
5568        }
5569        for val in &self.ar_u32 {
5570            __tmp.put_u32_le(*val);
5571        }
5572        __tmp.put_u8(self.v);
5573        if matches!(version, MavlinkVersion::V2) {
5574            let len = __tmp.len();
5575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5576        } else {
5577            __tmp.len()
5578        }
5579    }
5580}
5581#[doc = "Array test #4."]
5582#[doc = ""]
5583#[doc = "ID: 17154"]
5584#[derive(Debug, Clone, PartialEq)]
5585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5587#[cfg_attr(feature = "ts", derive(TS))]
5588#[cfg_attr(feature = "ts", ts(export))]
5589pub struct ARRAY_TEST_4_DATA {
5590    #[doc = "Value array"]
5591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5592    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5593    pub ar_u32: [u32; 4],
5594    #[doc = "Stub field"]
5595    pub v: u8,
5596}
5597impl ARRAY_TEST_4_DATA {
5598    pub const ENCODED_LEN: usize = 17usize;
5599    pub const DEFAULT: Self = Self {
5600        ar_u32: [0_u32; 4usize],
5601        v: 0_u8,
5602    };
5603    #[cfg(feature = "arbitrary")]
5604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5605        use arbitrary::{Arbitrary, Unstructured};
5606        let mut buf = [0u8; 1024];
5607        rng.fill_bytes(&mut buf);
5608        let mut unstructured = Unstructured::new(&buf);
5609        Self::arbitrary(&mut unstructured).unwrap_or_default()
5610    }
5611}
5612impl Default for ARRAY_TEST_4_DATA {
5613    fn default() -> Self {
5614        Self::DEFAULT.clone()
5615    }
5616}
5617impl MessageData for ARRAY_TEST_4_DATA {
5618    type Message = MavMessage;
5619    const ID: u32 = 17154u32;
5620    const NAME: &'static str = "ARRAY_TEST_4";
5621    const EXTRA_CRC: u8 = 89u8;
5622    const ENCODED_LEN: usize = 17usize;
5623    fn deser(
5624        _version: MavlinkVersion,
5625        __input: &[u8],
5626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5627        let avail_len = __input.len();
5628        let mut payload_buf = [0; Self::ENCODED_LEN];
5629        let mut buf = if avail_len < Self::ENCODED_LEN {
5630            payload_buf[0..avail_len].copy_from_slice(__input);
5631            Bytes::new(&payload_buf)
5632        } else {
5633            Bytes::new(__input)
5634        };
5635        let mut __struct = Self::default();
5636        for v in &mut __struct.ar_u32 {
5637            let val = buf.get_u32_le();
5638            *v = val;
5639        }
5640        __struct.v = buf.get_u8();
5641        Ok(__struct)
5642    }
5643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5644        let mut __tmp = BytesMut::new(bytes);
5645        #[allow(clippy::absurd_extreme_comparisons)]
5646        #[allow(unused_comparisons)]
5647        if __tmp.remaining() < Self::ENCODED_LEN {
5648            panic!(
5649                "buffer is too small (need {} bytes, but got {})",
5650                Self::ENCODED_LEN,
5651                __tmp.remaining(),
5652            )
5653        }
5654        for val in &self.ar_u32 {
5655            __tmp.put_u32_le(*val);
5656        }
5657        __tmp.put_u8(self.v);
5658        if matches!(version, MavlinkVersion::V2) {
5659            let len = __tmp.len();
5660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5661        } else {
5662            __tmp.len()
5663        }
5664    }
5665}
5666#[doc = "Array test #5."]
5667#[doc = ""]
5668#[doc = "ID: 17155"]
5669#[derive(Debug, Clone, PartialEq)]
5670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5672#[cfg_attr(feature = "ts", derive(TS))]
5673#[cfg_attr(feature = "ts", ts(export))]
5674pub struct ARRAY_TEST_5_DATA {
5675    #[doc = "Value array"]
5676    #[cfg_attr(feature = "ts", ts(type = "string"))]
5677    pub c1: CharArray<5>,
5678    #[doc = "Value array"]
5679    #[cfg_attr(feature = "ts", ts(type = "string"))]
5680    pub c2: CharArray<5>,
5681}
5682impl ARRAY_TEST_5_DATA {
5683    pub const ENCODED_LEN: usize = 10usize;
5684    pub const DEFAULT: Self = Self {
5685        c1: CharArray::new([0_u8; 5usize]),
5686        c2: CharArray::new([0_u8; 5usize]),
5687    };
5688    #[cfg(feature = "arbitrary")]
5689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5690        use arbitrary::{Arbitrary, Unstructured};
5691        let mut buf = [0u8; 1024];
5692        rng.fill_bytes(&mut buf);
5693        let mut unstructured = Unstructured::new(&buf);
5694        Self::arbitrary(&mut unstructured).unwrap_or_default()
5695    }
5696}
5697impl Default for ARRAY_TEST_5_DATA {
5698    fn default() -> Self {
5699        Self::DEFAULT.clone()
5700    }
5701}
5702impl MessageData for ARRAY_TEST_5_DATA {
5703    type Message = MavMessage;
5704    const ID: u32 = 17155u32;
5705    const NAME: &'static str = "ARRAY_TEST_5";
5706    const EXTRA_CRC: u8 = 27u8;
5707    const ENCODED_LEN: usize = 10usize;
5708    fn deser(
5709        _version: MavlinkVersion,
5710        __input: &[u8],
5711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5712        let avail_len = __input.len();
5713        let mut payload_buf = [0; Self::ENCODED_LEN];
5714        let mut buf = if avail_len < Self::ENCODED_LEN {
5715            payload_buf[0..avail_len].copy_from_slice(__input);
5716            Bytes::new(&payload_buf)
5717        } else {
5718            Bytes::new(__input)
5719        };
5720        let mut __struct = Self::default();
5721        let mut tmp = [0_u8; 5usize];
5722        for v in &mut tmp {
5723            *v = buf.get_u8();
5724        }
5725        __struct.c1 = CharArray::new(tmp);
5726        let mut tmp = [0_u8; 5usize];
5727        for v in &mut tmp {
5728            *v = buf.get_u8();
5729        }
5730        __struct.c2 = CharArray::new(tmp);
5731        Ok(__struct)
5732    }
5733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5734        let mut __tmp = BytesMut::new(bytes);
5735        #[allow(clippy::absurd_extreme_comparisons)]
5736        #[allow(unused_comparisons)]
5737        if __tmp.remaining() < Self::ENCODED_LEN {
5738            panic!(
5739                "buffer is too small (need {} bytes, but got {})",
5740                Self::ENCODED_LEN,
5741                __tmp.remaining(),
5742            )
5743        }
5744        for val in &self.c1 {
5745            __tmp.put_u8(*val);
5746        }
5747        for val in &self.c2 {
5748            __tmp.put_u8(*val);
5749        }
5750        if matches!(version, MavlinkVersion::V2) {
5751            let len = __tmp.len();
5752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5753        } else {
5754            __tmp.len()
5755        }
5756    }
5757}
5758#[doc = "Array test #6."]
5759#[doc = ""]
5760#[doc = "ID: 17156"]
5761#[derive(Debug, Clone, PartialEq)]
5762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5764#[cfg_attr(feature = "ts", derive(TS))]
5765#[cfg_attr(feature = "ts", ts(export))]
5766pub struct ARRAY_TEST_6_DATA {
5767    #[doc = "Value array"]
5768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5770    pub ar_d: [f64; 2],
5771    #[doc = "Stub field"]
5772    pub v3: u32,
5773    #[doc = "Value array"]
5774    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5775    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5776    pub ar_u32: [u32; 2],
5777    #[doc = "Value array"]
5778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5779    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5780    pub ar_i32: [i32; 2],
5781    #[doc = "Value array"]
5782    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5783    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5784    pub ar_f: [f32; 2],
5785    #[doc = "Stub field"]
5786    pub v2: u16,
5787    #[doc = "Value array"]
5788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5789    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5790    pub ar_u16: [u16; 2],
5791    #[doc = "Value array"]
5792    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5793    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5794    pub ar_i16: [i16; 2],
5795    #[doc = "Stub field"]
5796    pub v1: u8,
5797    #[doc = "Value array"]
5798    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5799    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5800    pub ar_u8: [u8; 2],
5801    #[doc = "Value array"]
5802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5803    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5804    pub ar_i8: [i8; 2],
5805    #[doc = "Value array"]
5806    #[cfg_attr(feature = "ts", ts(type = "string"))]
5807    pub ar_c: CharArray<32>,
5808}
5809impl ARRAY_TEST_6_DATA {
5810    pub const ENCODED_LEN: usize = 91usize;
5811    pub const DEFAULT: Self = Self {
5812        ar_d: [0.0_f64; 2usize],
5813        v3: 0_u32,
5814        ar_u32: [0_u32; 2usize],
5815        ar_i32: [0_i32; 2usize],
5816        ar_f: [0.0_f32; 2usize],
5817        v2: 0_u16,
5818        ar_u16: [0_u16; 2usize],
5819        ar_i16: [0_i16; 2usize],
5820        v1: 0_u8,
5821        ar_u8: [0_u8; 2usize],
5822        ar_i8: [0_i8; 2usize],
5823        ar_c: CharArray::new([0_u8; 32usize]),
5824    };
5825    #[cfg(feature = "arbitrary")]
5826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5827        use arbitrary::{Arbitrary, Unstructured};
5828        let mut buf = [0u8; 1024];
5829        rng.fill_bytes(&mut buf);
5830        let mut unstructured = Unstructured::new(&buf);
5831        Self::arbitrary(&mut unstructured).unwrap_or_default()
5832    }
5833}
5834impl Default for ARRAY_TEST_6_DATA {
5835    fn default() -> Self {
5836        Self::DEFAULT.clone()
5837    }
5838}
5839impl MessageData for ARRAY_TEST_6_DATA {
5840    type Message = MavMessage;
5841    const ID: u32 = 17156u32;
5842    const NAME: &'static str = "ARRAY_TEST_6";
5843    const EXTRA_CRC: u8 = 14u8;
5844    const ENCODED_LEN: usize = 91usize;
5845    fn deser(
5846        _version: MavlinkVersion,
5847        __input: &[u8],
5848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5849        let avail_len = __input.len();
5850        let mut payload_buf = [0; Self::ENCODED_LEN];
5851        let mut buf = if avail_len < Self::ENCODED_LEN {
5852            payload_buf[0..avail_len].copy_from_slice(__input);
5853            Bytes::new(&payload_buf)
5854        } else {
5855            Bytes::new(__input)
5856        };
5857        let mut __struct = Self::default();
5858        for v in &mut __struct.ar_d {
5859            let val = buf.get_f64_le();
5860            *v = val;
5861        }
5862        __struct.v3 = buf.get_u32_le();
5863        for v in &mut __struct.ar_u32 {
5864            let val = buf.get_u32_le();
5865            *v = val;
5866        }
5867        for v in &mut __struct.ar_i32 {
5868            let val = buf.get_i32_le();
5869            *v = val;
5870        }
5871        for v in &mut __struct.ar_f {
5872            let val = buf.get_f32_le();
5873            *v = val;
5874        }
5875        __struct.v2 = buf.get_u16_le();
5876        for v in &mut __struct.ar_u16 {
5877            let val = buf.get_u16_le();
5878            *v = val;
5879        }
5880        for v in &mut __struct.ar_i16 {
5881            let val = buf.get_i16_le();
5882            *v = val;
5883        }
5884        __struct.v1 = buf.get_u8();
5885        for v in &mut __struct.ar_u8 {
5886            let val = buf.get_u8();
5887            *v = val;
5888        }
5889        for v in &mut __struct.ar_i8 {
5890            let val = buf.get_i8();
5891            *v = val;
5892        }
5893        let mut tmp = [0_u8; 32usize];
5894        for v in &mut tmp {
5895            *v = buf.get_u8();
5896        }
5897        __struct.ar_c = CharArray::new(tmp);
5898        Ok(__struct)
5899    }
5900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5901        let mut __tmp = BytesMut::new(bytes);
5902        #[allow(clippy::absurd_extreme_comparisons)]
5903        #[allow(unused_comparisons)]
5904        if __tmp.remaining() < Self::ENCODED_LEN {
5905            panic!(
5906                "buffer is too small (need {} bytes, but got {})",
5907                Self::ENCODED_LEN,
5908                __tmp.remaining(),
5909            )
5910        }
5911        for val in &self.ar_d {
5912            __tmp.put_f64_le(*val);
5913        }
5914        __tmp.put_u32_le(self.v3);
5915        for val in &self.ar_u32 {
5916            __tmp.put_u32_le(*val);
5917        }
5918        for val in &self.ar_i32 {
5919            __tmp.put_i32_le(*val);
5920        }
5921        for val in &self.ar_f {
5922            __tmp.put_f32_le(*val);
5923        }
5924        __tmp.put_u16_le(self.v2);
5925        for val in &self.ar_u16 {
5926            __tmp.put_u16_le(*val);
5927        }
5928        for val in &self.ar_i16 {
5929            __tmp.put_i16_le(*val);
5930        }
5931        __tmp.put_u8(self.v1);
5932        for val in &self.ar_u8 {
5933            __tmp.put_u8(*val);
5934        }
5935        for val in &self.ar_i8 {
5936            __tmp.put_i8(*val);
5937        }
5938        for val in &self.ar_c {
5939            __tmp.put_u8(*val);
5940        }
5941        if matches!(version, MavlinkVersion::V2) {
5942            let len = __tmp.len();
5943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5944        } else {
5945            __tmp.len()
5946        }
5947    }
5948}
5949#[doc = "Array test #7."]
5950#[doc = ""]
5951#[doc = "ID: 17157"]
5952#[derive(Debug, Clone, PartialEq)]
5953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5955#[cfg_attr(feature = "ts", derive(TS))]
5956#[cfg_attr(feature = "ts", ts(export))]
5957pub struct ARRAY_TEST_7_DATA {
5958    #[doc = "Value array"]
5959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5960    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5961    pub ar_d: [f64; 2],
5962    #[doc = "Value array"]
5963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5965    pub ar_f: [f32; 2],
5966    #[doc = "Value array"]
5967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5968    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5969    pub ar_u32: [u32; 2],
5970    #[doc = "Value array"]
5971    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5972    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5973    pub ar_i32: [i32; 2],
5974    #[doc = "Value array"]
5975    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5976    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5977    pub ar_u16: [u16; 2],
5978    #[doc = "Value array"]
5979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5981    pub ar_i16: [i16; 2],
5982    #[doc = "Value array"]
5983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5984    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5985    pub ar_u8: [u8; 2],
5986    #[doc = "Value array"]
5987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5988    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5989    pub ar_i8: [i8; 2],
5990    #[doc = "Value array"]
5991    #[cfg_attr(feature = "ts", ts(type = "string"))]
5992    pub ar_c: CharArray<32>,
5993}
5994impl ARRAY_TEST_7_DATA {
5995    pub const ENCODED_LEN: usize = 84usize;
5996    pub const DEFAULT: Self = Self {
5997        ar_d: [0.0_f64; 2usize],
5998        ar_f: [0.0_f32; 2usize],
5999        ar_u32: [0_u32; 2usize],
6000        ar_i32: [0_i32; 2usize],
6001        ar_u16: [0_u16; 2usize],
6002        ar_i16: [0_i16; 2usize],
6003        ar_u8: [0_u8; 2usize],
6004        ar_i8: [0_i8; 2usize],
6005        ar_c: CharArray::new([0_u8; 32usize]),
6006    };
6007    #[cfg(feature = "arbitrary")]
6008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6009        use arbitrary::{Arbitrary, Unstructured};
6010        let mut buf = [0u8; 1024];
6011        rng.fill_bytes(&mut buf);
6012        let mut unstructured = Unstructured::new(&buf);
6013        Self::arbitrary(&mut unstructured).unwrap_or_default()
6014    }
6015}
6016impl Default for ARRAY_TEST_7_DATA {
6017    fn default() -> Self {
6018        Self::DEFAULT.clone()
6019    }
6020}
6021impl MessageData for ARRAY_TEST_7_DATA {
6022    type Message = MavMessage;
6023    const ID: u32 = 17157u32;
6024    const NAME: &'static str = "ARRAY_TEST_7";
6025    const EXTRA_CRC: u8 = 187u8;
6026    const ENCODED_LEN: usize = 84usize;
6027    fn deser(
6028        _version: MavlinkVersion,
6029        __input: &[u8],
6030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6031        let avail_len = __input.len();
6032        let mut payload_buf = [0; Self::ENCODED_LEN];
6033        let mut buf = if avail_len < Self::ENCODED_LEN {
6034            payload_buf[0..avail_len].copy_from_slice(__input);
6035            Bytes::new(&payload_buf)
6036        } else {
6037            Bytes::new(__input)
6038        };
6039        let mut __struct = Self::default();
6040        for v in &mut __struct.ar_d {
6041            let val = buf.get_f64_le();
6042            *v = val;
6043        }
6044        for v in &mut __struct.ar_f {
6045            let val = buf.get_f32_le();
6046            *v = val;
6047        }
6048        for v in &mut __struct.ar_u32 {
6049            let val = buf.get_u32_le();
6050            *v = val;
6051        }
6052        for v in &mut __struct.ar_i32 {
6053            let val = buf.get_i32_le();
6054            *v = val;
6055        }
6056        for v in &mut __struct.ar_u16 {
6057            let val = buf.get_u16_le();
6058            *v = val;
6059        }
6060        for v in &mut __struct.ar_i16 {
6061            let val = buf.get_i16_le();
6062            *v = val;
6063        }
6064        for v in &mut __struct.ar_u8 {
6065            let val = buf.get_u8();
6066            *v = val;
6067        }
6068        for v in &mut __struct.ar_i8 {
6069            let val = buf.get_i8();
6070            *v = val;
6071        }
6072        let mut tmp = [0_u8; 32usize];
6073        for v in &mut tmp {
6074            *v = buf.get_u8();
6075        }
6076        __struct.ar_c = CharArray::new(tmp);
6077        Ok(__struct)
6078    }
6079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6080        let mut __tmp = BytesMut::new(bytes);
6081        #[allow(clippy::absurd_extreme_comparisons)]
6082        #[allow(unused_comparisons)]
6083        if __tmp.remaining() < Self::ENCODED_LEN {
6084            panic!(
6085                "buffer is too small (need {} bytes, but got {})",
6086                Self::ENCODED_LEN,
6087                __tmp.remaining(),
6088            )
6089        }
6090        for val in &self.ar_d {
6091            __tmp.put_f64_le(*val);
6092        }
6093        for val in &self.ar_f {
6094            __tmp.put_f32_le(*val);
6095        }
6096        for val in &self.ar_u32 {
6097            __tmp.put_u32_le(*val);
6098        }
6099        for val in &self.ar_i32 {
6100            __tmp.put_i32_le(*val);
6101        }
6102        for val in &self.ar_u16 {
6103            __tmp.put_u16_le(*val);
6104        }
6105        for val in &self.ar_i16 {
6106            __tmp.put_i16_le(*val);
6107        }
6108        for val in &self.ar_u8 {
6109            __tmp.put_u8(*val);
6110        }
6111        for val in &self.ar_i8 {
6112            __tmp.put_i8(*val);
6113        }
6114        for val in &self.ar_c {
6115            __tmp.put_u8(*val);
6116        }
6117        if matches!(version, MavlinkVersion::V2) {
6118            let len = __tmp.len();
6119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6120        } else {
6121            __tmp.len()
6122        }
6123    }
6124}
6125#[doc = "Array test #8."]
6126#[doc = ""]
6127#[doc = "ID: 17158"]
6128#[derive(Debug, Clone, PartialEq)]
6129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6131#[cfg_attr(feature = "ts", derive(TS))]
6132#[cfg_attr(feature = "ts", ts(export))]
6133pub struct ARRAY_TEST_8_DATA {
6134    #[doc = "Value array"]
6135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6137    pub ar_d: [f64; 2],
6138    #[doc = "Stub field"]
6139    pub v3: u32,
6140    #[doc = "Value array"]
6141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6143    pub ar_u16: [u16; 2],
6144}
6145impl ARRAY_TEST_8_DATA {
6146    pub const ENCODED_LEN: usize = 24usize;
6147    pub const DEFAULT: Self = Self {
6148        ar_d: [0.0_f64; 2usize],
6149        v3: 0_u32,
6150        ar_u16: [0_u16; 2usize],
6151    };
6152    #[cfg(feature = "arbitrary")]
6153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6154        use arbitrary::{Arbitrary, Unstructured};
6155        let mut buf = [0u8; 1024];
6156        rng.fill_bytes(&mut buf);
6157        let mut unstructured = Unstructured::new(&buf);
6158        Self::arbitrary(&mut unstructured).unwrap_or_default()
6159    }
6160}
6161impl Default for ARRAY_TEST_8_DATA {
6162    fn default() -> Self {
6163        Self::DEFAULT.clone()
6164    }
6165}
6166impl MessageData for ARRAY_TEST_8_DATA {
6167    type Message = MavMessage;
6168    const ID: u32 = 17158u32;
6169    const NAME: &'static str = "ARRAY_TEST_8";
6170    const EXTRA_CRC: u8 = 106u8;
6171    const ENCODED_LEN: usize = 24usize;
6172    fn deser(
6173        _version: MavlinkVersion,
6174        __input: &[u8],
6175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6176        let avail_len = __input.len();
6177        let mut payload_buf = [0; Self::ENCODED_LEN];
6178        let mut buf = if avail_len < Self::ENCODED_LEN {
6179            payload_buf[0..avail_len].copy_from_slice(__input);
6180            Bytes::new(&payload_buf)
6181        } else {
6182            Bytes::new(__input)
6183        };
6184        let mut __struct = Self::default();
6185        for v in &mut __struct.ar_d {
6186            let val = buf.get_f64_le();
6187            *v = val;
6188        }
6189        __struct.v3 = buf.get_u32_le();
6190        for v in &mut __struct.ar_u16 {
6191            let val = buf.get_u16_le();
6192            *v = val;
6193        }
6194        Ok(__struct)
6195    }
6196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6197        let mut __tmp = BytesMut::new(bytes);
6198        #[allow(clippy::absurd_extreme_comparisons)]
6199        #[allow(unused_comparisons)]
6200        if __tmp.remaining() < Self::ENCODED_LEN {
6201            panic!(
6202                "buffer is too small (need {} bytes, but got {})",
6203                Self::ENCODED_LEN,
6204                __tmp.remaining(),
6205            )
6206        }
6207        for val in &self.ar_d {
6208            __tmp.put_f64_le(*val);
6209        }
6210        __tmp.put_u32_le(self.v3);
6211        for val in &self.ar_u16 {
6212            __tmp.put_u16_le(*val);
6213        }
6214        if matches!(version, MavlinkVersion::V2) {
6215            let len = __tmp.len();
6216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6217        } else {
6218            __tmp.len()
6219        }
6220    }
6221}
6222#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
6223#[doc = ""]
6224#[doc = "ID: 30"]
6225#[derive(Debug, Clone, PartialEq)]
6226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6228#[cfg_attr(feature = "ts", derive(TS))]
6229#[cfg_attr(feature = "ts", ts(export))]
6230pub struct ATTITUDE_DATA {
6231    #[doc = "Timestamp (time since system boot)."]
6232    pub time_boot_ms: u32,
6233    #[doc = "Roll angle (-pi..+pi)"]
6234    pub roll: f32,
6235    #[doc = "Pitch angle (-pi..+pi)"]
6236    pub pitch: f32,
6237    #[doc = "Yaw angle (-pi..+pi)"]
6238    pub yaw: f32,
6239    #[doc = "Roll angular speed"]
6240    pub rollspeed: f32,
6241    #[doc = "Pitch angular speed"]
6242    pub pitchspeed: f32,
6243    #[doc = "Yaw angular speed"]
6244    pub yawspeed: f32,
6245}
6246impl ATTITUDE_DATA {
6247    pub const ENCODED_LEN: usize = 28usize;
6248    pub const DEFAULT: Self = Self {
6249        time_boot_ms: 0_u32,
6250        roll: 0.0_f32,
6251        pitch: 0.0_f32,
6252        yaw: 0.0_f32,
6253        rollspeed: 0.0_f32,
6254        pitchspeed: 0.0_f32,
6255        yawspeed: 0.0_f32,
6256    };
6257    #[cfg(feature = "arbitrary")]
6258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6259        use arbitrary::{Arbitrary, Unstructured};
6260        let mut buf = [0u8; 1024];
6261        rng.fill_bytes(&mut buf);
6262        let mut unstructured = Unstructured::new(&buf);
6263        Self::arbitrary(&mut unstructured).unwrap_or_default()
6264    }
6265}
6266impl Default for ATTITUDE_DATA {
6267    fn default() -> Self {
6268        Self::DEFAULT.clone()
6269    }
6270}
6271impl MessageData for ATTITUDE_DATA {
6272    type Message = MavMessage;
6273    const ID: u32 = 30u32;
6274    const NAME: &'static str = "ATTITUDE";
6275    const EXTRA_CRC: u8 = 39u8;
6276    const ENCODED_LEN: usize = 28usize;
6277    fn deser(
6278        _version: MavlinkVersion,
6279        __input: &[u8],
6280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6281        let avail_len = __input.len();
6282        let mut payload_buf = [0; Self::ENCODED_LEN];
6283        let mut buf = if avail_len < Self::ENCODED_LEN {
6284            payload_buf[0..avail_len].copy_from_slice(__input);
6285            Bytes::new(&payload_buf)
6286        } else {
6287            Bytes::new(__input)
6288        };
6289        let mut __struct = Self::default();
6290        __struct.time_boot_ms = buf.get_u32_le();
6291        __struct.roll = buf.get_f32_le();
6292        __struct.pitch = buf.get_f32_le();
6293        __struct.yaw = buf.get_f32_le();
6294        __struct.rollspeed = buf.get_f32_le();
6295        __struct.pitchspeed = buf.get_f32_le();
6296        __struct.yawspeed = buf.get_f32_le();
6297        Ok(__struct)
6298    }
6299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6300        let mut __tmp = BytesMut::new(bytes);
6301        #[allow(clippy::absurd_extreme_comparisons)]
6302        #[allow(unused_comparisons)]
6303        if __tmp.remaining() < Self::ENCODED_LEN {
6304            panic!(
6305                "buffer is too small (need {} bytes, but got {})",
6306                Self::ENCODED_LEN,
6307                __tmp.remaining(),
6308            )
6309        }
6310        __tmp.put_u32_le(self.time_boot_ms);
6311        __tmp.put_f32_le(self.roll);
6312        __tmp.put_f32_le(self.pitch);
6313        __tmp.put_f32_le(self.yaw);
6314        __tmp.put_f32_le(self.rollspeed);
6315        __tmp.put_f32_le(self.pitchspeed);
6316        __tmp.put_f32_le(self.yawspeed);
6317        if matches!(version, MavlinkVersion::V2) {
6318            let len = __tmp.len();
6319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6320        } else {
6321            __tmp.len()
6322        }
6323    }
6324}
6325#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6326#[doc = ""]
6327#[doc = "ID: 31"]
6328#[derive(Debug, Clone, PartialEq)]
6329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6331#[cfg_attr(feature = "ts", derive(TS))]
6332#[cfg_attr(feature = "ts", ts(export))]
6333pub struct ATTITUDE_QUATERNION_DATA {
6334    #[doc = "Timestamp (time since system boot)."]
6335    pub time_boot_ms: u32,
6336    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6337    pub q1: f32,
6338    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6339    pub q2: f32,
6340    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6341    pub q3: f32,
6342    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6343    pub q4: f32,
6344    #[doc = "Roll angular speed"]
6345    pub rollspeed: f32,
6346    #[doc = "Pitch angular speed"]
6347    pub pitchspeed: f32,
6348    #[doc = "Yaw angular speed"]
6349    pub yawspeed: f32,
6350    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
6351    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6353    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6354    pub repr_offset_q: [f32; 4],
6355}
6356impl ATTITUDE_QUATERNION_DATA {
6357    pub const ENCODED_LEN: usize = 48usize;
6358    pub const DEFAULT: Self = Self {
6359        time_boot_ms: 0_u32,
6360        q1: 0.0_f32,
6361        q2: 0.0_f32,
6362        q3: 0.0_f32,
6363        q4: 0.0_f32,
6364        rollspeed: 0.0_f32,
6365        pitchspeed: 0.0_f32,
6366        yawspeed: 0.0_f32,
6367        repr_offset_q: [0.0_f32; 4usize],
6368    };
6369    #[cfg(feature = "arbitrary")]
6370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6371        use arbitrary::{Arbitrary, Unstructured};
6372        let mut buf = [0u8; 1024];
6373        rng.fill_bytes(&mut buf);
6374        let mut unstructured = Unstructured::new(&buf);
6375        Self::arbitrary(&mut unstructured).unwrap_or_default()
6376    }
6377}
6378impl Default for ATTITUDE_QUATERNION_DATA {
6379    fn default() -> Self {
6380        Self::DEFAULT.clone()
6381    }
6382}
6383impl MessageData for ATTITUDE_QUATERNION_DATA {
6384    type Message = MavMessage;
6385    const ID: u32 = 31u32;
6386    const NAME: &'static str = "ATTITUDE_QUATERNION";
6387    const EXTRA_CRC: u8 = 246u8;
6388    const ENCODED_LEN: usize = 48usize;
6389    fn deser(
6390        _version: MavlinkVersion,
6391        __input: &[u8],
6392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6393        let avail_len = __input.len();
6394        let mut payload_buf = [0; Self::ENCODED_LEN];
6395        let mut buf = if avail_len < Self::ENCODED_LEN {
6396            payload_buf[0..avail_len].copy_from_slice(__input);
6397            Bytes::new(&payload_buf)
6398        } else {
6399            Bytes::new(__input)
6400        };
6401        let mut __struct = Self::default();
6402        __struct.time_boot_ms = buf.get_u32_le();
6403        __struct.q1 = buf.get_f32_le();
6404        __struct.q2 = buf.get_f32_le();
6405        __struct.q3 = buf.get_f32_le();
6406        __struct.q4 = buf.get_f32_le();
6407        __struct.rollspeed = buf.get_f32_le();
6408        __struct.pitchspeed = buf.get_f32_le();
6409        __struct.yawspeed = buf.get_f32_le();
6410        for v in &mut __struct.repr_offset_q {
6411            let val = buf.get_f32_le();
6412            *v = val;
6413        }
6414        Ok(__struct)
6415    }
6416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6417        let mut __tmp = BytesMut::new(bytes);
6418        #[allow(clippy::absurd_extreme_comparisons)]
6419        #[allow(unused_comparisons)]
6420        if __tmp.remaining() < Self::ENCODED_LEN {
6421            panic!(
6422                "buffer is too small (need {} bytes, but got {})",
6423                Self::ENCODED_LEN,
6424                __tmp.remaining(),
6425            )
6426        }
6427        __tmp.put_u32_le(self.time_boot_ms);
6428        __tmp.put_f32_le(self.q1);
6429        __tmp.put_f32_le(self.q2);
6430        __tmp.put_f32_le(self.q3);
6431        __tmp.put_f32_le(self.q4);
6432        __tmp.put_f32_le(self.rollspeed);
6433        __tmp.put_f32_le(self.pitchspeed);
6434        __tmp.put_f32_le(self.yawspeed);
6435        if matches!(version, MavlinkVersion::V2) {
6436            for val in &self.repr_offset_q {
6437                __tmp.put_f32_le(*val);
6438            }
6439            let len = __tmp.len();
6440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6441        } else {
6442            __tmp.len()
6443        }
6444    }
6445}
6446#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6447#[doc = ""]
6448#[doc = "ID: 61"]
6449#[derive(Debug, Clone, PartialEq)]
6450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6452#[cfg_attr(feature = "ts", derive(TS))]
6453#[cfg_attr(feature = "ts", ts(export))]
6454pub struct ATTITUDE_QUATERNION_COV_DATA {
6455    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6456    pub time_usec: u64,
6457    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6459    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6460    pub q: [f32; 4],
6461    #[doc = "Roll angular speed"]
6462    pub rollspeed: f32,
6463    #[doc = "Pitch angular speed"]
6464    pub pitchspeed: f32,
6465    #[doc = "Yaw angular speed"]
6466    pub yawspeed: f32,
6467    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6470    pub covariance: [f32; 9],
6471}
6472impl ATTITUDE_QUATERNION_COV_DATA {
6473    pub const ENCODED_LEN: usize = 72usize;
6474    pub const DEFAULT: Self = Self {
6475        time_usec: 0_u64,
6476        q: [0.0_f32; 4usize],
6477        rollspeed: 0.0_f32,
6478        pitchspeed: 0.0_f32,
6479        yawspeed: 0.0_f32,
6480        covariance: [0.0_f32; 9usize],
6481    };
6482    #[cfg(feature = "arbitrary")]
6483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6484        use arbitrary::{Arbitrary, Unstructured};
6485        let mut buf = [0u8; 1024];
6486        rng.fill_bytes(&mut buf);
6487        let mut unstructured = Unstructured::new(&buf);
6488        Self::arbitrary(&mut unstructured).unwrap_or_default()
6489    }
6490}
6491impl Default for ATTITUDE_QUATERNION_COV_DATA {
6492    fn default() -> Self {
6493        Self::DEFAULT.clone()
6494    }
6495}
6496impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6497    type Message = MavMessage;
6498    const ID: u32 = 61u32;
6499    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6500    const EXTRA_CRC: u8 = 167u8;
6501    const ENCODED_LEN: usize = 72usize;
6502    fn deser(
6503        _version: MavlinkVersion,
6504        __input: &[u8],
6505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6506        let avail_len = __input.len();
6507        let mut payload_buf = [0; Self::ENCODED_LEN];
6508        let mut buf = if avail_len < Self::ENCODED_LEN {
6509            payload_buf[0..avail_len].copy_from_slice(__input);
6510            Bytes::new(&payload_buf)
6511        } else {
6512            Bytes::new(__input)
6513        };
6514        let mut __struct = Self::default();
6515        __struct.time_usec = buf.get_u64_le();
6516        for v in &mut __struct.q {
6517            let val = buf.get_f32_le();
6518            *v = val;
6519        }
6520        __struct.rollspeed = buf.get_f32_le();
6521        __struct.pitchspeed = buf.get_f32_le();
6522        __struct.yawspeed = buf.get_f32_le();
6523        for v in &mut __struct.covariance {
6524            let val = buf.get_f32_le();
6525            *v = val;
6526        }
6527        Ok(__struct)
6528    }
6529    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6530        let mut __tmp = BytesMut::new(bytes);
6531        #[allow(clippy::absurd_extreme_comparisons)]
6532        #[allow(unused_comparisons)]
6533        if __tmp.remaining() < Self::ENCODED_LEN {
6534            panic!(
6535                "buffer is too small (need {} bytes, but got {})",
6536                Self::ENCODED_LEN,
6537                __tmp.remaining(),
6538            )
6539        }
6540        __tmp.put_u64_le(self.time_usec);
6541        for val in &self.q {
6542            __tmp.put_f32_le(*val);
6543        }
6544        __tmp.put_f32_le(self.rollspeed);
6545        __tmp.put_f32_le(self.pitchspeed);
6546        __tmp.put_f32_le(self.yawspeed);
6547        for val in &self.covariance {
6548            __tmp.put_f32_le(*val);
6549        }
6550        if matches!(version, MavlinkVersion::V2) {
6551            let len = __tmp.len();
6552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6553        } else {
6554            __tmp.len()
6555        }
6556    }
6557}
6558#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6559#[doc = ""]
6560#[doc = "ID: 83"]
6561#[derive(Debug, Clone, PartialEq)]
6562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6564#[cfg_attr(feature = "ts", derive(TS))]
6565#[cfg_attr(feature = "ts", ts(export))]
6566pub struct ATTITUDE_TARGET_DATA {
6567    #[doc = "Timestamp (time since system boot)."]
6568    pub time_boot_ms: u32,
6569    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6572    pub q: [f32; 4],
6573    #[doc = "Body roll rate"]
6574    pub body_roll_rate: f32,
6575    #[doc = "Body pitch rate"]
6576    pub body_pitch_rate: f32,
6577    #[doc = "Body yaw rate"]
6578    pub body_yaw_rate: f32,
6579    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6580    pub thrust: f32,
6581    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6582    pub type_mask: AttitudeTargetTypemask,
6583}
6584impl ATTITUDE_TARGET_DATA {
6585    pub const ENCODED_LEN: usize = 37usize;
6586    pub const DEFAULT: Self = Self {
6587        time_boot_ms: 0_u32,
6588        q: [0.0_f32; 4usize],
6589        body_roll_rate: 0.0_f32,
6590        body_pitch_rate: 0.0_f32,
6591        body_yaw_rate: 0.0_f32,
6592        thrust: 0.0_f32,
6593        type_mask: AttitudeTargetTypemask::DEFAULT,
6594    };
6595    #[cfg(feature = "arbitrary")]
6596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6597        use arbitrary::{Arbitrary, Unstructured};
6598        let mut buf = [0u8; 1024];
6599        rng.fill_bytes(&mut buf);
6600        let mut unstructured = Unstructured::new(&buf);
6601        Self::arbitrary(&mut unstructured).unwrap_or_default()
6602    }
6603}
6604impl Default for ATTITUDE_TARGET_DATA {
6605    fn default() -> Self {
6606        Self::DEFAULT.clone()
6607    }
6608}
6609impl MessageData for ATTITUDE_TARGET_DATA {
6610    type Message = MavMessage;
6611    const ID: u32 = 83u32;
6612    const NAME: &'static str = "ATTITUDE_TARGET";
6613    const EXTRA_CRC: u8 = 22u8;
6614    const ENCODED_LEN: usize = 37usize;
6615    fn deser(
6616        _version: MavlinkVersion,
6617        __input: &[u8],
6618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6619        let avail_len = __input.len();
6620        let mut payload_buf = [0; Self::ENCODED_LEN];
6621        let mut buf = if avail_len < Self::ENCODED_LEN {
6622            payload_buf[0..avail_len].copy_from_slice(__input);
6623            Bytes::new(&payload_buf)
6624        } else {
6625            Bytes::new(__input)
6626        };
6627        let mut __struct = Self::default();
6628        __struct.time_boot_ms = buf.get_u32_le();
6629        for v in &mut __struct.q {
6630            let val = buf.get_f32_le();
6631            *v = val;
6632        }
6633        __struct.body_roll_rate = buf.get_f32_le();
6634        __struct.body_pitch_rate = buf.get_f32_le();
6635        __struct.body_yaw_rate = buf.get_f32_le();
6636        __struct.thrust = buf.get_f32_le();
6637        let tmp = buf.get_u8();
6638        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
6639            ::mavlink_core::error::ParserError::InvalidFlag {
6640                flag_type: "AttitudeTargetTypemask",
6641                value: tmp as u64,
6642            },
6643        )?;
6644        Ok(__struct)
6645    }
6646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6647        let mut __tmp = BytesMut::new(bytes);
6648        #[allow(clippy::absurd_extreme_comparisons)]
6649        #[allow(unused_comparisons)]
6650        if __tmp.remaining() < Self::ENCODED_LEN {
6651            panic!(
6652                "buffer is too small (need {} bytes, but got {})",
6653                Self::ENCODED_LEN,
6654                __tmp.remaining(),
6655            )
6656        }
6657        __tmp.put_u32_le(self.time_boot_ms);
6658        for val in &self.q {
6659            __tmp.put_f32_le(*val);
6660        }
6661        __tmp.put_f32_le(self.body_roll_rate);
6662        __tmp.put_f32_le(self.body_pitch_rate);
6663        __tmp.put_f32_le(self.body_yaw_rate);
6664        __tmp.put_f32_le(self.thrust);
6665        __tmp.put_u8(self.type_mask.bits());
6666        if matches!(version, MavlinkVersion::V2) {
6667            let len = __tmp.len();
6668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6669        } else {
6670            __tmp.len()
6671        }
6672    }
6673}
6674#[doc = "Motion capture attitude and position."]
6675#[doc = ""]
6676#[doc = "ID: 138"]
6677#[derive(Debug, Clone, PartialEq)]
6678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6680#[cfg_attr(feature = "ts", derive(TS))]
6681#[cfg_attr(feature = "ts", ts(export))]
6682pub struct ATT_POS_MOCAP_DATA {
6683    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6684    pub time_usec: u64,
6685    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6687    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6688    pub q: [f32; 4],
6689    #[doc = "X position (NED)"]
6690    pub x: f32,
6691    #[doc = "Y position (NED)"]
6692    pub y: f32,
6693    #[doc = "Z position (NED)"]
6694    pub z: f32,
6695    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6696    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6698    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6699    pub covariance: [f32; 21],
6700}
6701impl ATT_POS_MOCAP_DATA {
6702    pub const ENCODED_LEN: usize = 120usize;
6703    pub const DEFAULT: Self = Self {
6704        time_usec: 0_u64,
6705        q: [0.0_f32; 4usize],
6706        x: 0.0_f32,
6707        y: 0.0_f32,
6708        z: 0.0_f32,
6709        covariance: [0.0_f32; 21usize],
6710    };
6711    #[cfg(feature = "arbitrary")]
6712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6713        use arbitrary::{Arbitrary, Unstructured};
6714        let mut buf = [0u8; 1024];
6715        rng.fill_bytes(&mut buf);
6716        let mut unstructured = Unstructured::new(&buf);
6717        Self::arbitrary(&mut unstructured).unwrap_or_default()
6718    }
6719}
6720impl Default for ATT_POS_MOCAP_DATA {
6721    fn default() -> Self {
6722        Self::DEFAULT.clone()
6723    }
6724}
6725impl MessageData for ATT_POS_MOCAP_DATA {
6726    type Message = MavMessage;
6727    const ID: u32 = 138u32;
6728    const NAME: &'static str = "ATT_POS_MOCAP";
6729    const EXTRA_CRC: u8 = 109u8;
6730    const ENCODED_LEN: usize = 120usize;
6731    fn deser(
6732        _version: MavlinkVersion,
6733        __input: &[u8],
6734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6735        let avail_len = __input.len();
6736        let mut payload_buf = [0; Self::ENCODED_LEN];
6737        let mut buf = if avail_len < Self::ENCODED_LEN {
6738            payload_buf[0..avail_len].copy_from_slice(__input);
6739            Bytes::new(&payload_buf)
6740        } else {
6741            Bytes::new(__input)
6742        };
6743        let mut __struct = Self::default();
6744        __struct.time_usec = buf.get_u64_le();
6745        for v in &mut __struct.q {
6746            let val = buf.get_f32_le();
6747            *v = val;
6748        }
6749        __struct.x = buf.get_f32_le();
6750        __struct.y = buf.get_f32_le();
6751        __struct.z = buf.get_f32_le();
6752        for v in &mut __struct.covariance {
6753            let val = buf.get_f32_le();
6754            *v = val;
6755        }
6756        Ok(__struct)
6757    }
6758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6759        let mut __tmp = BytesMut::new(bytes);
6760        #[allow(clippy::absurd_extreme_comparisons)]
6761        #[allow(unused_comparisons)]
6762        if __tmp.remaining() < Self::ENCODED_LEN {
6763            panic!(
6764                "buffer is too small (need {} bytes, but got {})",
6765                Self::ENCODED_LEN,
6766                __tmp.remaining(),
6767            )
6768        }
6769        __tmp.put_u64_le(self.time_usec);
6770        for val in &self.q {
6771            __tmp.put_f32_le(*val);
6772        }
6773        __tmp.put_f32_le(self.x);
6774        __tmp.put_f32_le(self.y);
6775        __tmp.put_f32_le(self.z);
6776        if matches!(version, MavlinkVersion::V2) {
6777            for val in &self.covariance {
6778                __tmp.put_f32_le(*val);
6779            }
6780            let len = __tmp.len();
6781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6782        } else {
6783            __tmp.len()
6784        }
6785    }
6786}
6787#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6788#[doc = ""]
6789#[doc = "ID: 7"]
6790#[derive(Debug, Clone, PartialEq)]
6791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6793#[cfg_attr(feature = "ts", derive(TS))]
6794#[cfg_attr(feature = "ts", ts(export))]
6795pub struct AUTH_KEY_DATA {
6796    #[doc = "key"]
6797    #[cfg_attr(feature = "ts", ts(type = "string"))]
6798    pub key: CharArray<32>,
6799}
6800impl AUTH_KEY_DATA {
6801    pub const ENCODED_LEN: usize = 32usize;
6802    pub const DEFAULT: Self = Self {
6803        key: CharArray::new([0_u8; 32usize]),
6804    };
6805    #[cfg(feature = "arbitrary")]
6806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6807        use arbitrary::{Arbitrary, Unstructured};
6808        let mut buf = [0u8; 1024];
6809        rng.fill_bytes(&mut buf);
6810        let mut unstructured = Unstructured::new(&buf);
6811        Self::arbitrary(&mut unstructured).unwrap_or_default()
6812    }
6813}
6814impl Default for AUTH_KEY_DATA {
6815    fn default() -> Self {
6816        Self::DEFAULT.clone()
6817    }
6818}
6819impl MessageData for AUTH_KEY_DATA {
6820    type Message = MavMessage;
6821    const ID: u32 = 7u32;
6822    const NAME: &'static str = "AUTH_KEY";
6823    const EXTRA_CRC: u8 = 119u8;
6824    const ENCODED_LEN: usize = 32usize;
6825    fn deser(
6826        _version: MavlinkVersion,
6827        __input: &[u8],
6828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6829        let avail_len = __input.len();
6830        let mut payload_buf = [0; Self::ENCODED_LEN];
6831        let mut buf = if avail_len < Self::ENCODED_LEN {
6832            payload_buf[0..avail_len].copy_from_slice(__input);
6833            Bytes::new(&payload_buf)
6834        } else {
6835            Bytes::new(__input)
6836        };
6837        let mut __struct = Self::default();
6838        let mut tmp = [0_u8; 32usize];
6839        for v in &mut tmp {
6840            *v = buf.get_u8();
6841        }
6842        __struct.key = CharArray::new(tmp);
6843        Ok(__struct)
6844    }
6845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6846        let mut __tmp = BytesMut::new(bytes);
6847        #[allow(clippy::absurd_extreme_comparisons)]
6848        #[allow(unused_comparisons)]
6849        if __tmp.remaining() < Self::ENCODED_LEN {
6850            panic!(
6851                "buffer is too small (need {} bytes, but got {})",
6852                Self::ENCODED_LEN,
6853                __tmp.remaining(),
6854            )
6855        }
6856        for val in &self.key {
6857            __tmp.put_u8(*val);
6858        }
6859        if matches!(version, MavlinkVersion::V2) {
6860            let len = __tmp.len();
6861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6862        } else {
6863            __tmp.len()
6864        }
6865    }
6866}
6867#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6868#[doc = ""]
6869#[doc = "ID: 286"]
6870#[derive(Debug, Clone, PartialEq)]
6871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6873#[cfg_attr(feature = "ts", derive(TS))]
6874#[cfg_attr(feature = "ts", ts(export))]
6875pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6876    #[doc = "Timestamp (time since system boot)."]
6877    pub time_boot_us: u64,
6878    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6879    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6880    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6881    pub q: [f32; 4],
6882    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6883    pub q_estimated_delay_us: u32,
6884    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6885    pub vx: f32,
6886    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6887    pub vy: f32,
6888    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6889    pub vz: f32,
6890    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6891    pub v_estimated_delay_us: u32,
6892    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6893    pub feed_forward_angular_velocity_z: f32,
6894    #[doc = "Bitmap indicating which estimator outputs are valid."]
6895    pub estimator_status: EstimatorStatusFlags,
6896    #[doc = "System ID"]
6897    pub target_system: u8,
6898    #[doc = "Component ID"]
6899    pub target_component: u8,
6900    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6901    pub landed_state: MavLandedState,
6902    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6903    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6904    pub angular_velocity_z: f32,
6905}
6906impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6907    pub const ENCODED_LEN: usize = 57usize;
6908    pub const DEFAULT: Self = Self {
6909        time_boot_us: 0_u64,
6910        q: [0.0_f32; 4usize],
6911        q_estimated_delay_us: 0_u32,
6912        vx: 0.0_f32,
6913        vy: 0.0_f32,
6914        vz: 0.0_f32,
6915        v_estimated_delay_us: 0_u32,
6916        feed_forward_angular_velocity_z: 0.0_f32,
6917        estimator_status: EstimatorStatusFlags::DEFAULT,
6918        target_system: 0_u8,
6919        target_component: 0_u8,
6920        landed_state: MavLandedState::DEFAULT,
6921        angular_velocity_z: 0.0_f32,
6922    };
6923    #[cfg(feature = "arbitrary")]
6924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6925        use arbitrary::{Arbitrary, Unstructured};
6926        let mut buf = [0u8; 1024];
6927        rng.fill_bytes(&mut buf);
6928        let mut unstructured = Unstructured::new(&buf);
6929        Self::arbitrary(&mut unstructured).unwrap_or_default()
6930    }
6931}
6932impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6933    fn default() -> Self {
6934        Self::DEFAULT.clone()
6935    }
6936}
6937impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6938    type Message = MavMessage;
6939    const ID: u32 = 286u32;
6940    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6941    const EXTRA_CRC: u8 = 210u8;
6942    const ENCODED_LEN: usize = 57usize;
6943    fn deser(
6944        _version: MavlinkVersion,
6945        __input: &[u8],
6946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6947        let avail_len = __input.len();
6948        let mut payload_buf = [0; Self::ENCODED_LEN];
6949        let mut buf = if avail_len < Self::ENCODED_LEN {
6950            payload_buf[0..avail_len].copy_from_slice(__input);
6951            Bytes::new(&payload_buf)
6952        } else {
6953            Bytes::new(__input)
6954        };
6955        let mut __struct = Self::default();
6956        __struct.time_boot_us = buf.get_u64_le();
6957        for v in &mut __struct.q {
6958            let val = buf.get_f32_le();
6959            *v = val;
6960        }
6961        __struct.q_estimated_delay_us = buf.get_u32_le();
6962        __struct.vx = buf.get_f32_le();
6963        __struct.vy = buf.get_f32_le();
6964        __struct.vz = buf.get_f32_le();
6965        __struct.v_estimated_delay_us = buf.get_u32_le();
6966        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6967        let tmp = buf.get_u16_le();
6968        __struct.estimator_status = EstimatorStatusFlags::from_bits(tmp).ok_or(
6969            ::mavlink_core::error::ParserError::InvalidFlag {
6970                flag_type: "EstimatorStatusFlags",
6971                value: tmp as u64,
6972            },
6973        )?;
6974        __struct.target_system = buf.get_u8();
6975        __struct.target_component = buf.get_u8();
6976        let tmp = buf.get_u8();
6977        __struct.landed_state =
6978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6979                enum_type: "MavLandedState",
6980                value: tmp as u64,
6981            })?;
6982        __struct.angular_velocity_z = buf.get_f32_le();
6983        Ok(__struct)
6984    }
6985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6986        let mut __tmp = BytesMut::new(bytes);
6987        #[allow(clippy::absurd_extreme_comparisons)]
6988        #[allow(unused_comparisons)]
6989        if __tmp.remaining() < Self::ENCODED_LEN {
6990            panic!(
6991                "buffer is too small (need {} bytes, but got {})",
6992                Self::ENCODED_LEN,
6993                __tmp.remaining(),
6994            )
6995        }
6996        __tmp.put_u64_le(self.time_boot_us);
6997        for val in &self.q {
6998            __tmp.put_f32_le(*val);
6999        }
7000        __tmp.put_u32_le(self.q_estimated_delay_us);
7001        __tmp.put_f32_le(self.vx);
7002        __tmp.put_f32_le(self.vy);
7003        __tmp.put_f32_le(self.vz);
7004        __tmp.put_u32_le(self.v_estimated_delay_us);
7005        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
7006        __tmp.put_u16_le(self.estimator_status.bits());
7007        __tmp.put_u8(self.target_system);
7008        __tmp.put_u8(self.target_component);
7009        __tmp.put_u8(self.landed_state as u8);
7010        if matches!(version, MavlinkVersion::V2) {
7011            __tmp.put_f32_le(self.angular_velocity_z);
7012            let len = __tmp.len();
7013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7014        } else {
7015            __tmp.len()
7016        }
7017    }
7018}
7019#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
7020#[doc = ""]
7021#[doc = "ID: 148"]
7022#[derive(Debug, Clone, PartialEq)]
7023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7025#[cfg_attr(feature = "ts", derive(TS))]
7026#[cfg_attr(feature = "ts", ts(export))]
7027pub struct AUTOPILOT_VERSION_DATA {
7028    #[doc = "Bitmap of capabilities"]
7029    pub capabilities: MavProtocolCapability,
7030    #[doc = "UID if provided by hardware (see uid2)"]
7031    pub uid: u64,
7032    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
7033    pub flight_sw_version: u32,
7034    #[doc = "Middleware version number"]
7035    pub middleware_sw_version: u32,
7036    #[doc = "Operating system version number"]
7037    pub os_sw_version: u32,
7038    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
7039    pub board_version: u32,
7040    #[doc = "ID of the board vendor"]
7041    pub vendor_id: u16,
7042    #[doc = "ID of the product"]
7043    pub product_id: u16,
7044    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7047    pub flight_custom_version: [u8; 8],
7048    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7049    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7050    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7051    pub middleware_custom_version: [u8; 8],
7052    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
7053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7054    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7055    pub os_custom_version: [u8; 8],
7056    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
7057    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7058    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7059    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7060    pub uid2: [u8; 18],
7061}
7062impl AUTOPILOT_VERSION_DATA {
7063    pub const ENCODED_LEN: usize = 78usize;
7064    pub const DEFAULT: Self = Self {
7065        capabilities: MavProtocolCapability::DEFAULT,
7066        uid: 0_u64,
7067        flight_sw_version: 0_u32,
7068        middleware_sw_version: 0_u32,
7069        os_sw_version: 0_u32,
7070        board_version: 0_u32,
7071        vendor_id: 0_u16,
7072        product_id: 0_u16,
7073        flight_custom_version: [0_u8; 8usize],
7074        middleware_custom_version: [0_u8; 8usize],
7075        os_custom_version: [0_u8; 8usize],
7076        uid2: [0_u8; 18usize],
7077    };
7078    #[cfg(feature = "arbitrary")]
7079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7080        use arbitrary::{Arbitrary, Unstructured};
7081        let mut buf = [0u8; 1024];
7082        rng.fill_bytes(&mut buf);
7083        let mut unstructured = Unstructured::new(&buf);
7084        Self::arbitrary(&mut unstructured).unwrap_or_default()
7085    }
7086}
7087impl Default for AUTOPILOT_VERSION_DATA {
7088    fn default() -> Self {
7089        Self::DEFAULT.clone()
7090    }
7091}
7092impl MessageData for AUTOPILOT_VERSION_DATA {
7093    type Message = MavMessage;
7094    const ID: u32 = 148u32;
7095    const NAME: &'static str = "AUTOPILOT_VERSION";
7096    const EXTRA_CRC: u8 = 178u8;
7097    const ENCODED_LEN: usize = 78usize;
7098    fn deser(
7099        _version: MavlinkVersion,
7100        __input: &[u8],
7101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7102        let avail_len = __input.len();
7103        let mut payload_buf = [0; Self::ENCODED_LEN];
7104        let mut buf = if avail_len < Self::ENCODED_LEN {
7105            payload_buf[0..avail_len].copy_from_slice(__input);
7106            Bytes::new(&payload_buf)
7107        } else {
7108            Bytes::new(__input)
7109        };
7110        let mut __struct = Self::default();
7111        let tmp = buf.get_u64_le();
7112        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
7113            ::mavlink_core::error::ParserError::InvalidFlag {
7114                flag_type: "MavProtocolCapability",
7115                value: tmp as u64,
7116            },
7117        )?;
7118        __struct.uid = buf.get_u64_le();
7119        __struct.flight_sw_version = buf.get_u32_le();
7120        __struct.middleware_sw_version = buf.get_u32_le();
7121        __struct.os_sw_version = buf.get_u32_le();
7122        __struct.board_version = buf.get_u32_le();
7123        __struct.vendor_id = buf.get_u16_le();
7124        __struct.product_id = buf.get_u16_le();
7125        for v in &mut __struct.flight_custom_version {
7126            let val = buf.get_u8();
7127            *v = val;
7128        }
7129        for v in &mut __struct.middleware_custom_version {
7130            let val = buf.get_u8();
7131            *v = val;
7132        }
7133        for v in &mut __struct.os_custom_version {
7134            let val = buf.get_u8();
7135            *v = val;
7136        }
7137        for v in &mut __struct.uid2 {
7138            let val = buf.get_u8();
7139            *v = val;
7140        }
7141        Ok(__struct)
7142    }
7143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7144        let mut __tmp = BytesMut::new(bytes);
7145        #[allow(clippy::absurd_extreme_comparisons)]
7146        #[allow(unused_comparisons)]
7147        if __tmp.remaining() < Self::ENCODED_LEN {
7148            panic!(
7149                "buffer is too small (need {} bytes, but got {})",
7150                Self::ENCODED_LEN,
7151                __tmp.remaining(),
7152            )
7153        }
7154        __tmp.put_u64_le(self.capabilities.bits());
7155        __tmp.put_u64_le(self.uid);
7156        __tmp.put_u32_le(self.flight_sw_version);
7157        __tmp.put_u32_le(self.middleware_sw_version);
7158        __tmp.put_u32_le(self.os_sw_version);
7159        __tmp.put_u32_le(self.board_version);
7160        __tmp.put_u16_le(self.vendor_id);
7161        __tmp.put_u16_le(self.product_id);
7162        for val in &self.flight_custom_version {
7163            __tmp.put_u8(*val);
7164        }
7165        for val in &self.middleware_custom_version {
7166            __tmp.put_u8(*val);
7167        }
7168        for val in &self.os_custom_version {
7169            __tmp.put_u8(*val);
7170        }
7171        if matches!(version, MavlinkVersion::V2) {
7172            for val in &self.uid2 {
7173                __tmp.put_u8(*val);
7174            }
7175            let len = __tmp.len();
7176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7177        } else {
7178            __tmp.len()
7179        }
7180    }
7181}
7182#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
7183#[doc = ""]
7184#[doc = "ID: 435"]
7185#[derive(Debug, Clone, PartialEq)]
7186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7188#[cfg_attr(feature = "ts", derive(TS))]
7189#[cfg_attr(feature = "ts", ts(export))]
7190pub struct AVAILABLE_MODES_DATA {
7191    #[doc = "A bitfield for use for autopilot-specific flags"]
7192    pub custom_mode: u32,
7193    #[doc = "Mode properties."]
7194    pub properties: MavModeProperty,
7195    #[doc = "The total number of available modes for the current vehicle type."]
7196    pub number_modes: u8,
7197    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
7198    pub mode_index: u8,
7199    #[doc = "Standard mode."]
7200    pub standard_mode: MavStandardMode,
7201    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
7202    #[cfg_attr(feature = "ts", ts(type = "string"))]
7203    pub mode_name: CharArray<35>,
7204}
7205impl AVAILABLE_MODES_DATA {
7206    pub const ENCODED_LEN: usize = 46usize;
7207    pub const DEFAULT: Self = Self {
7208        custom_mode: 0_u32,
7209        properties: MavModeProperty::DEFAULT,
7210        number_modes: 0_u8,
7211        mode_index: 0_u8,
7212        standard_mode: MavStandardMode::DEFAULT,
7213        mode_name: CharArray::new([0_u8; 35usize]),
7214    };
7215    #[cfg(feature = "arbitrary")]
7216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7217        use arbitrary::{Arbitrary, Unstructured};
7218        let mut buf = [0u8; 1024];
7219        rng.fill_bytes(&mut buf);
7220        let mut unstructured = Unstructured::new(&buf);
7221        Self::arbitrary(&mut unstructured).unwrap_or_default()
7222    }
7223}
7224impl Default for AVAILABLE_MODES_DATA {
7225    fn default() -> Self {
7226        Self::DEFAULT.clone()
7227    }
7228}
7229impl MessageData for AVAILABLE_MODES_DATA {
7230    type Message = MavMessage;
7231    const ID: u32 = 435u32;
7232    const NAME: &'static str = "AVAILABLE_MODES";
7233    const EXTRA_CRC: u8 = 134u8;
7234    const ENCODED_LEN: usize = 46usize;
7235    fn deser(
7236        _version: MavlinkVersion,
7237        __input: &[u8],
7238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7239        let avail_len = __input.len();
7240        let mut payload_buf = [0; Self::ENCODED_LEN];
7241        let mut buf = if avail_len < Self::ENCODED_LEN {
7242            payload_buf[0..avail_len].copy_from_slice(__input);
7243            Bytes::new(&payload_buf)
7244        } else {
7245            Bytes::new(__input)
7246        };
7247        let mut __struct = Self::default();
7248        __struct.custom_mode = buf.get_u32_le();
7249        let tmp = buf.get_u32_le();
7250        __struct.properties = MavModeProperty::from_bits(tmp).ok_or(
7251            ::mavlink_core::error::ParserError::InvalidFlag {
7252                flag_type: "MavModeProperty",
7253                value: tmp as u64,
7254            },
7255        )?;
7256        __struct.number_modes = buf.get_u8();
7257        __struct.mode_index = buf.get_u8();
7258        let tmp = buf.get_u8();
7259        __struct.standard_mode =
7260            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7261                enum_type: "MavStandardMode",
7262                value: tmp as u64,
7263            })?;
7264        let mut tmp = [0_u8; 35usize];
7265        for v in &mut tmp {
7266            *v = buf.get_u8();
7267        }
7268        __struct.mode_name = CharArray::new(tmp);
7269        Ok(__struct)
7270    }
7271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7272        let mut __tmp = BytesMut::new(bytes);
7273        #[allow(clippy::absurd_extreme_comparisons)]
7274        #[allow(unused_comparisons)]
7275        if __tmp.remaining() < Self::ENCODED_LEN {
7276            panic!(
7277                "buffer is too small (need {} bytes, but got {})",
7278                Self::ENCODED_LEN,
7279                __tmp.remaining(),
7280            )
7281        }
7282        __tmp.put_u32_le(self.custom_mode);
7283        __tmp.put_u32_le(self.properties.bits());
7284        __tmp.put_u8(self.number_modes);
7285        __tmp.put_u8(self.mode_index);
7286        __tmp.put_u8(self.standard_mode as u8);
7287        for val in &self.mode_name {
7288            __tmp.put_u8(*val);
7289        }
7290        if matches!(version, MavlinkVersion::V2) {
7291            let len = __tmp.len();
7292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7293        } else {
7294            __tmp.len()
7295        }
7296    }
7297}
7298#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
7299#[doc = ""]
7300#[doc = "ID: 437"]
7301#[derive(Debug, Clone, PartialEq)]
7302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7304#[cfg_attr(feature = "ts", derive(TS))]
7305#[cfg_attr(feature = "ts", ts(export))]
7306pub struct AVAILABLE_MODES_MONITOR_DATA {
7307    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
7308    pub seq: u8,
7309}
7310impl AVAILABLE_MODES_MONITOR_DATA {
7311    pub const ENCODED_LEN: usize = 1usize;
7312    pub const DEFAULT: Self = Self { seq: 0_u8 };
7313    #[cfg(feature = "arbitrary")]
7314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7315        use arbitrary::{Arbitrary, Unstructured};
7316        let mut buf = [0u8; 1024];
7317        rng.fill_bytes(&mut buf);
7318        let mut unstructured = Unstructured::new(&buf);
7319        Self::arbitrary(&mut unstructured).unwrap_or_default()
7320    }
7321}
7322impl Default for AVAILABLE_MODES_MONITOR_DATA {
7323    fn default() -> Self {
7324        Self::DEFAULT.clone()
7325    }
7326}
7327impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
7328    type Message = MavMessage;
7329    const ID: u32 = 437u32;
7330    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
7331    const EXTRA_CRC: u8 = 30u8;
7332    const ENCODED_LEN: usize = 1usize;
7333    fn deser(
7334        _version: MavlinkVersion,
7335        __input: &[u8],
7336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7337        let avail_len = __input.len();
7338        let mut payload_buf = [0; Self::ENCODED_LEN];
7339        let mut buf = if avail_len < Self::ENCODED_LEN {
7340            payload_buf[0..avail_len].copy_from_slice(__input);
7341            Bytes::new(&payload_buf)
7342        } else {
7343            Bytes::new(__input)
7344        };
7345        let mut __struct = Self::default();
7346        __struct.seq = buf.get_u8();
7347        Ok(__struct)
7348    }
7349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7350        let mut __tmp = BytesMut::new(bytes);
7351        #[allow(clippy::absurd_extreme_comparisons)]
7352        #[allow(unused_comparisons)]
7353        if __tmp.remaining() < Self::ENCODED_LEN {
7354            panic!(
7355                "buffer is too small (need {} bytes, but got {})",
7356                Self::ENCODED_LEN,
7357                __tmp.remaining(),
7358            )
7359        }
7360        __tmp.put_u8(self.seq);
7361        if matches!(version, MavlinkVersion::V2) {
7362            let len = __tmp.len();
7363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7364        } else {
7365            __tmp.len()
7366        }
7367    }
7368}
7369#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
7370#[doc = ""]
7371#[doc = "ID: 372"]
7372#[derive(Debug, Clone, PartialEq)]
7373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7375#[cfg_attr(feature = "ts", derive(TS))]
7376#[cfg_attr(feature = "ts", ts(export))]
7377pub struct BATTERY_INFO_DATA {
7378    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7379    pub discharge_minimum_voltage: f32,
7380    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7381    pub charging_minimum_voltage: f32,
7382    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7383    pub resting_minimum_voltage: f32,
7384    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7385    pub charging_maximum_voltage: f32,
7386    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7387    pub charging_maximum_current: f32,
7388    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7389    pub nominal_voltage: f32,
7390    #[doc = "Maximum pack discharge current. 0: field not provided."]
7391    pub discharge_maximum_current: f32,
7392    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7393    pub discharge_maximum_burst_current: f32,
7394    #[doc = "Fully charged design capacity. 0: field not provided."]
7395    pub design_capacity: f32,
7396    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7397    pub full_charge_capacity: f32,
7398    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7399    pub cycle_count: u16,
7400    #[doc = "Battery weight. 0: field not provided."]
7401    pub weight: u16,
7402    #[doc = "Battery ID"]
7403    pub id: u8,
7404    #[doc = "Function of the battery."]
7405    pub battery_function: MavBatteryFunction,
7406    #[doc = "Type (chemistry) of the battery."]
7407    pub mavtype: MavBatteryType,
7408    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7409    pub state_of_health: u8,
7410    #[doc = "Number of battery cells in series. 0: field not provided."]
7411    pub cells_in_series: u8,
7412    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7413    #[cfg_attr(feature = "ts", ts(type = "string"))]
7414    pub manufacture_date: CharArray<9>,
7415    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7416    #[cfg_attr(feature = "ts", ts(type = "string"))]
7417    pub serial_number: CharArray<32>,
7418    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7419    #[cfg_attr(feature = "ts", ts(type = "string"))]
7420    pub name: CharArray<50>,
7421}
7422impl BATTERY_INFO_DATA {
7423    pub const ENCODED_LEN: usize = 140usize;
7424    pub const DEFAULT: Self = Self {
7425        discharge_minimum_voltage: 0.0_f32,
7426        charging_minimum_voltage: 0.0_f32,
7427        resting_minimum_voltage: 0.0_f32,
7428        charging_maximum_voltage: 0.0_f32,
7429        charging_maximum_current: 0.0_f32,
7430        nominal_voltage: 0.0_f32,
7431        discharge_maximum_current: 0.0_f32,
7432        discharge_maximum_burst_current: 0.0_f32,
7433        design_capacity: 0.0_f32,
7434        full_charge_capacity: 0.0_f32,
7435        cycle_count: 0_u16,
7436        weight: 0_u16,
7437        id: 0_u8,
7438        battery_function: MavBatteryFunction::DEFAULT,
7439        mavtype: MavBatteryType::DEFAULT,
7440        state_of_health: 0_u8,
7441        cells_in_series: 0_u8,
7442        manufacture_date: CharArray::new([0_u8; 9usize]),
7443        serial_number: CharArray::new([0_u8; 32usize]),
7444        name: CharArray::new([0_u8; 50usize]),
7445    };
7446    #[cfg(feature = "arbitrary")]
7447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7448        use arbitrary::{Arbitrary, Unstructured};
7449        let mut buf = [0u8; 1024];
7450        rng.fill_bytes(&mut buf);
7451        let mut unstructured = Unstructured::new(&buf);
7452        Self::arbitrary(&mut unstructured).unwrap_or_default()
7453    }
7454}
7455impl Default for BATTERY_INFO_DATA {
7456    fn default() -> Self {
7457        Self::DEFAULT.clone()
7458    }
7459}
7460impl MessageData for BATTERY_INFO_DATA {
7461    type Message = MavMessage;
7462    const ID: u32 = 372u32;
7463    const NAME: &'static str = "BATTERY_INFO";
7464    const EXTRA_CRC: u8 = 26u8;
7465    const ENCODED_LEN: usize = 140usize;
7466    fn deser(
7467        _version: MavlinkVersion,
7468        __input: &[u8],
7469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7470        let avail_len = __input.len();
7471        let mut payload_buf = [0; Self::ENCODED_LEN];
7472        let mut buf = if avail_len < Self::ENCODED_LEN {
7473            payload_buf[0..avail_len].copy_from_slice(__input);
7474            Bytes::new(&payload_buf)
7475        } else {
7476            Bytes::new(__input)
7477        };
7478        let mut __struct = Self::default();
7479        __struct.discharge_minimum_voltage = buf.get_f32_le();
7480        __struct.charging_minimum_voltage = buf.get_f32_le();
7481        __struct.resting_minimum_voltage = buf.get_f32_le();
7482        __struct.charging_maximum_voltage = buf.get_f32_le();
7483        __struct.charging_maximum_current = buf.get_f32_le();
7484        __struct.nominal_voltage = buf.get_f32_le();
7485        __struct.discharge_maximum_current = buf.get_f32_le();
7486        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7487        __struct.design_capacity = buf.get_f32_le();
7488        __struct.full_charge_capacity = buf.get_f32_le();
7489        __struct.cycle_count = buf.get_u16_le();
7490        __struct.weight = buf.get_u16_le();
7491        __struct.id = buf.get_u8();
7492        let tmp = buf.get_u8();
7493        __struct.battery_function =
7494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7495                enum_type: "MavBatteryFunction",
7496                value: tmp as u64,
7497            })?;
7498        let tmp = buf.get_u8();
7499        __struct.mavtype =
7500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7501                enum_type: "MavBatteryType",
7502                value: tmp as u64,
7503            })?;
7504        __struct.state_of_health = buf.get_u8();
7505        __struct.cells_in_series = buf.get_u8();
7506        let mut tmp = [0_u8; 9usize];
7507        for v in &mut tmp {
7508            *v = buf.get_u8();
7509        }
7510        __struct.manufacture_date = CharArray::new(tmp);
7511        let mut tmp = [0_u8; 32usize];
7512        for v in &mut tmp {
7513            *v = buf.get_u8();
7514        }
7515        __struct.serial_number = CharArray::new(tmp);
7516        let mut tmp = [0_u8; 50usize];
7517        for v in &mut tmp {
7518            *v = buf.get_u8();
7519        }
7520        __struct.name = CharArray::new(tmp);
7521        Ok(__struct)
7522    }
7523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7524        let mut __tmp = BytesMut::new(bytes);
7525        #[allow(clippy::absurd_extreme_comparisons)]
7526        #[allow(unused_comparisons)]
7527        if __tmp.remaining() < Self::ENCODED_LEN {
7528            panic!(
7529                "buffer is too small (need {} bytes, but got {})",
7530                Self::ENCODED_LEN,
7531                __tmp.remaining(),
7532            )
7533        }
7534        __tmp.put_f32_le(self.discharge_minimum_voltage);
7535        __tmp.put_f32_le(self.charging_minimum_voltage);
7536        __tmp.put_f32_le(self.resting_minimum_voltage);
7537        __tmp.put_f32_le(self.charging_maximum_voltage);
7538        __tmp.put_f32_le(self.charging_maximum_current);
7539        __tmp.put_f32_le(self.nominal_voltage);
7540        __tmp.put_f32_le(self.discharge_maximum_current);
7541        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7542        __tmp.put_f32_le(self.design_capacity);
7543        __tmp.put_f32_le(self.full_charge_capacity);
7544        __tmp.put_u16_le(self.cycle_count);
7545        __tmp.put_u16_le(self.weight);
7546        __tmp.put_u8(self.id);
7547        __tmp.put_u8(self.battery_function as u8);
7548        __tmp.put_u8(self.mavtype as u8);
7549        __tmp.put_u8(self.state_of_health);
7550        __tmp.put_u8(self.cells_in_series);
7551        for val in &self.manufacture_date {
7552            __tmp.put_u8(*val);
7553        }
7554        for val in &self.serial_number {
7555            __tmp.put_u8(*val);
7556        }
7557        for val in &self.name {
7558            __tmp.put_u8(*val);
7559        }
7560        if matches!(version, MavlinkVersion::V2) {
7561            let len = __tmp.len();
7562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7563        } else {
7564            __tmp.len()
7565        }
7566    }
7567}
7568#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7569#[doc = ""]
7570#[doc = "ID: 147"]
7571#[derive(Debug, Clone, PartialEq)]
7572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7574#[cfg_attr(feature = "ts", derive(TS))]
7575#[cfg_attr(feature = "ts", ts(export))]
7576pub struct BATTERY_STATUS_DATA {
7577    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7578    pub current_consumed: i32,
7579    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7580    pub energy_consumed: i32,
7581    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7582    pub temperature: i16,
7583    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7584    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7585    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7586    pub voltages: [u16; 10],
7587    #[doc = "Battery current, -1: autopilot does not measure the current"]
7588    pub current_battery: i16,
7589    #[doc = "Battery ID"]
7590    pub id: u8,
7591    #[doc = "Function of the battery"]
7592    pub battery_function: MavBatteryFunction,
7593    #[doc = "Type (chemistry) of the battery"]
7594    pub mavtype: MavBatteryType,
7595    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7596    pub battery_remaining: i8,
7597    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7599    pub time_remaining: i32,
7600    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7601    #[cfg_attr(feature = "serde", serde(default))]
7602    pub charge_state: MavBatteryChargeState,
7603    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7607    pub voltages_ext: [u16; 4],
7608    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7609    #[cfg_attr(feature = "serde", serde(default))]
7610    pub mode: MavBatteryMode,
7611    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7612    #[cfg_attr(feature = "serde", serde(default))]
7613    pub fault_bitmask: MavBatteryFault,
7614}
7615impl BATTERY_STATUS_DATA {
7616    pub const ENCODED_LEN: usize = 54usize;
7617    pub const DEFAULT: Self = Self {
7618        current_consumed: 0_i32,
7619        energy_consumed: 0_i32,
7620        temperature: 0_i16,
7621        voltages: [0_u16; 10usize],
7622        current_battery: 0_i16,
7623        id: 0_u8,
7624        battery_function: MavBatteryFunction::DEFAULT,
7625        mavtype: MavBatteryType::DEFAULT,
7626        battery_remaining: 0_i8,
7627        time_remaining: 0_i32,
7628        charge_state: MavBatteryChargeState::DEFAULT,
7629        voltages_ext: [0_u16; 4usize],
7630        mode: MavBatteryMode::DEFAULT,
7631        fault_bitmask: MavBatteryFault::DEFAULT,
7632    };
7633    #[cfg(feature = "arbitrary")]
7634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7635        use arbitrary::{Arbitrary, Unstructured};
7636        let mut buf = [0u8; 1024];
7637        rng.fill_bytes(&mut buf);
7638        let mut unstructured = Unstructured::new(&buf);
7639        Self::arbitrary(&mut unstructured).unwrap_or_default()
7640    }
7641}
7642impl Default for BATTERY_STATUS_DATA {
7643    fn default() -> Self {
7644        Self::DEFAULT.clone()
7645    }
7646}
7647impl MessageData for BATTERY_STATUS_DATA {
7648    type Message = MavMessage;
7649    const ID: u32 = 147u32;
7650    const NAME: &'static str = "BATTERY_STATUS";
7651    const EXTRA_CRC: u8 = 154u8;
7652    const ENCODED_LEN: usize = 54usize;
7653    fn deser(
7654        _version: MavlinkVersion,
7655        __input: &[u8],
7656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7657        let avail_len = __input.len();
7658        let mut payload_buf = [0; Self::ENCODED_LEN];
7659        let mut buf = if avail_len < Self::ENCODED_LEN {
7660            payload_buf[0..avail_len].copy_from_slice(__input);
7661            Bytes::new(&payload_buf)
7662        } else {
7663            Bytes::new(__input)
7664        };
7665        let mut __struct = Self::default();
7666        __struct.current_consumed = buf.get_i32_le();
7667        __struct.energy_consumed = buf.get_i32_le();
7668        __struct.temperature = buf.get_i16_le();
7669        for v in &mut __struct.voltages {
7670            let val = buf.get_u16_le();
7671            *v = val;
7672        }
7673        __struct.current_battery = buf.get_i16_le();
7674        __struct.id = buf.get_u8();
7675        let tmp = buf.get_u8();
7676        __struct.battery_function =
7677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7678                enum_type: "MavBatteryFunction",
7679                value: tmp as u64,
7680            })?;
7681        let tmp = buf.get_u8();
7682        __struct.mavtype =
7683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7684                enum_type: "MavBatteryType",
7685                value: tmp as u64,
7686            })?;
7687        __struct.battery_remaining = buf.get_i8();
7688        __struct.time_remaining = buf.get_i32_le();
7689        let tmp = buf.get_u8();
7690        __struct.charge_state =
7691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7692                enum_type: "MavBatteryChargeState",
7693                value: tmp as u64,
7694            })?;
7695        for v in &mut __struct.voltages_ext {
7696            let val = buf.get_u16_le();
7697            *v = val;
7698        }
7699        let tmp = buf.get_u8();
7700        __struct.mode =
7701            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7702                enum_type: "MavBatteryMode",
7703                value: tmp as u64,
7704            })?;
7705        let tmp = buf.get_u32_le();
7706        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp).ok_or(
7707            ::mavlink_core::error::ParserError::InvalidFlag {
7708                flag_type: "MavBatteryFault",
7709                value: tmp as u64,
7710            },
7711        )?;
7712        Ok(__struct)
7713    }
7714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7715        let mut __tmp = BytesMut::new(bytes);
7716        #[allow(clippy::absurd_extreme_comparisons)]
7717        #[allow(unused_comparisons)]
7718        if __tmp.remaining() < Self::ENCODED_LEN {
7719            panic!(
7720                "buffer is too small (need {} bytes, but got {})",
7721                Self::ENCODED_LEN,
7722                __tmp.remaining(),
7723            )
7724        }
7725        __tmp.put_i32_le(self.current_consumed);
7726        __tmp.put_i32_le(self.energy_consumed);
7727        __tmp.put_i16_le(self.temperature);
7728        for val in &self.voltages {
7729            __tmp.put_u16_le(*val);
7730        }
7731        __tmp.put_i16_le(self.current_battery);
7732        __tmp.put_u8(self.id);
7733        __tmp.put_u8(self.battery_function as u8);
7734        __tmp.put_u8(self.mavtype as u8);
7735        __tmp.put_i8(self.battery_remaining);
7736        if matches!(version, MavlinkVersion::V2) {
7737            __tmp.put_i32_le(self.time_remaining);
7738            __tmp.put_u8(self.charge_state as u8);
7739            for val in &self.voltages_ext {
7740                __tmp.put_u16_le(*val);
7741            }
7742            __tmp.put_u8(self.mode as u8);
7743            __tmp.put_u32_le(self.fault_bitmask.bits());
7744            let len = __tmp.len();
7745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7746        } else {
7747            __tmp.len()
7748        }
7749    }
7750}
7751#[doc = "Report button state change."]
7752#[doc = ""]
7753#[doc = "ID: 257"]
7754#[derive(Debug, Clone, PartialEq)]
7755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7757#[cfg_attr(feature = "ts", derive(TS))]
7758#[cfg_attr(feature = "ts", ts(export))]
7759pub struct BUTTON_CHANGE_DATA {
7760    #[doc = "Timestamp (time since system boot)."]
7761    pub time_boot_ms: u32,
7762    #[doc = "Time of last change of button state."]
7763    pub last_change_ms: u32,
7764    #[doc = "Bitmap for state of buttons."]
7765    pub state: u8,
7766}
7767impl BUTTON_CHANGE_DATA {
7768    pub const ENCODED_LEN: usize = 9usize;
7769    pub const DEFAULT: Self = Self {
7770        time_boot_ms: 0_u32,
7771        last_change_ms: 0_u32,
7772        state: 0_u8,
7773    };
7774    #[cfg(feature = "arbitrary")]
7775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7776        use arbitrary::{Arbitrary, Unstructured};
7777        let mut buf = [0u8; 1024];
7778        rng.fill_bytes(&mut buf);
7779        let mut unstructured = Unstructured::new(&buf);
7780        Self::arbitrary(&mut unstructured).unwrap_or_default()
7781    }
7782}
7783impl Default for BUTTON_CHANGE_DATA {
7784    fn default() -> Self {
7785        Self::DEFAULT.clone()
7786    }
7787}
7788impl MessageData for BUTTON_CHANGE_DATA {
7789    type Message = MavMessage;
7790    const ID: u32 = 257u32;
7791    const NAME: &'static str = "BUTTON_CHANGE";
7792    const EXTRA_CRC: u8 = 131u8;
7793    const ENCODED_LEN: usize = 9usize;
7794    fn deser(
7795        _version: MavlinkVersion,
7796        __input: &[u8],
7797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7798        let avail_len = __input.len();
7799        let mut payload_buf = [0; Self::ENCODED_LEN];
7800        let mut buf = if avail_len < Self::ENCODED_LEN {
7801            payload_buf[0..avail_len].copy_from_slice(__input);
7802            Bytes::new(&payload_buf)
7803        } else {
7804            Bytes::new(__input)
7805        };
7806        let mut __struct = Self::default();
7807        __struct.time_boot_ms = buf.get_u32_le();
7808        __struct.last_change_ms = buf.get_u32_le();
7809        __struct.state = buf.get_u8();
7810        Ok(__struct)
7811    }
7812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7813        let mut __tmp = BytesMut::new(bytes);
7814        #[allow(clippy::absurd_extreme_comparisons)]
7815        #[allow(unused_comparisons)]
7816        if __tmp.remaining() < Self::ENCODED_LEN {
7817            panic!(
7818                "buffer is too small (need {} bytes, but got {})",
7819                Self::ENCODED_LEN,
7820                __tmp.remaining(),
7821            )
7822        }
7823        __tmp.put_u32_le(self.time_boot_ms);
7824        __tmp.put_u32_le(self.last_change_ms);
7825        __tmp.put_u8(self.state);
7826        if matches!(version, MavlinkVersion::V2) {
7827            let len = __tmp.len();
7828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7829        } else {
7830            __tmp.len()
7831        }
7832    }
7833}
7834#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7835#[doc = ""]
7836#[doc = "ID: 262"]
7837#[derive(Debug, Clone, PartialEq)]
7838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7840#[cfg_attr(feature = "ts", derive(TS))]
7841#[cfg_attr(feature = "ts", ts(export))]
7842pub struct CAMERA_CAPTURE_STATUS_DATA {
7843    #[doc = "Timestamp (time since system boot)."]
7844    pub time_boot_ms: u32,
7845    #[doc = "Image capture interval"]
7846    pub image_interval: f32,
7847    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7848    pub recording_time_ms: u32,
7849    #[doc = "Available storage capacity."]
7850    pub available_capacity: f32,
7851    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7852    pub image_status: u8,
7853    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7854    pub video_status: u8,
7855    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7857    pub image_count: i32,
7858    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7859    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7860    pub camera_device_id: u8,
7861}
7862impl CAMERA_CAPTURE_STATUS_DATA {
7863    pub const ENCODED_LEN: usize = 23usize;
7864    pub const DEFAULT: Self = Self {
7865        time_boot_ms: 0_u32,
7866        image_interval: 0.0_f32,
7867        recording_time_ms: 0_u32,
7868        available_capacity: 0.0_f32,
7869        image_status: 0_u8,
7870        video_status: 0_u8,
7871        image_count: 0_i32,
7872        camera_device_id: 0_u8,
7873    };
7874    #[cfg(feature = "arbitrary")]
7875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7876        use arbitrary::{Arbitrary, Unstructured};
7877        let mut buf = [0u8; 1024];
7878        rng.fill_bytes(&mut buf);
7879        let mut unstructured = Unstructured::new(&buf);
7880        Self::arbitrary(&mut unstructured).unwrap_or_default()
7881    }
7882}
7883impl Default for CAMERA_CAPTURE_STATUS_DATA {
7884    fn default() -> Self {
7885        Self::DEFAULT.clone()
7886    }
7887}
7888impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7889    type Message = MavMessage;
7890    const ID: u32 = 262u32;
7891    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7892    const EXTRA_CRC: u8 = 12u8;
7893    const ENCODED_LEN: usize = 23usize;
7894    fn deser(
7895        _version: MavlinkVersion,
7896        __input: &[u8],
7897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7898        let avail_len = __input.len();
7899        let mut payload_buf = [0; Self::ENCODED_LEN];
7900        let mut buf = if avail_len < Self::ENCODED_LEN {
7901            payload_buf[0..avail_len].copy_from_slice(__input);
7902            Bytes::new(&payload_buf)
7903        } else {
7904            Bytes::new(__input)
7905        };
7906        let mut __struct = Self::default();
7907        __struct.time_boot_ms = buf.get_u32_le();
7908        __struct.image_interval = buf.get_f32_le();
7909        __struct.recording_time_ms = buf.get_u32_le();
7910        __struct.available_capacity = buf.get_f32_le();
7911        __struct.image_status = buf.get_u8();
7912        __struct.video_status = buf.get_u8();
7913        __struct.image_count = buf.get_i32_le();
7914        __struct.camera_device_id = buf.get_u8();
7915        Ok(__struct)
7916    }
7917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7918        let mut __tmp = BytesMut::new(bytes);
7919        #[allow(clippy::absurd_extreme_comparisons)]
7920        #[allow(unused_comparisons)]
7921        if __tmp.remaining() < Self::ENCODED_LEN {
7922            panic!(
7923                "buffer is too small (need {} bytes, but got {})",
7924                Self::ENCODED_LEN,
7925                __tmp.remaining(),
7926            )
7927        }
7928        __tmp.put_u32_le(self.time_boot_ms);
7929        __tmp.put_f32_le(self.image_interval);
7930        __tmp.put_u32_le(self.recording_time_ms);
7931        __tmp.put_f32_le(self.available_capacity);
7932        __tmp.put_u8(self.image_status);
7933        __tmp.put_u8(self.video_status);
7934        if matches!(version, MavlinkVersion::V2) {
7935            __tmp.put_i32_le(self.image_count);
7936            __tmp.put_u8(self.camera_device_id);
7937            let len = __tmp.len();
7938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7939        } else {
7940            __tmp.len()
7941        }
7942    }
7943}
7944#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7945#[doc = ""]
7946#[doc = "ID: 271"]
7947#[derive(Debug, Clone, PartialEq)]
7948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7950#[cfg_attr(feature = "ts", derive(TS))]
7951#[cfg_attr(feature = "ts", ts(export))]
7952pub struct CAMERA_FOV_STATUS_DATA {
7953    #[doc = "Timestamp (time since system boot)."]
7954    pub time_boot_ms: u32,
7955    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7956    pub lat_camera: i32,
7957    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7958    pub lon_camera: i32,
7959    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7960    pub alt_camera: i32,
7961    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7962    pub lat_image: i32,
7963    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7964    pub lon_image: i32,
7965    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7966    pub alt_image: i32,
7967    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7969    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7970    pub q: [f32; 4],
7971    #[doc = "Horizontal field of view (NaN if unknown)."]
7972    pub hfov: f32,
7973    #[doc = "Vertical field of view (NaN if unknown)."]
7974    pub vfov: f32,
7975    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7977    pub camera_device_id: u8,
7978}
7979impl CAMERA_FOV_STATUS_DATA {
7980    pub const ENCODED_LEN: usize = 53usize;
7981    pub const DEFAULT: Self = Self {
7982        time_boot_ms: 0_u32,
7983        lat_camera: 0_i32,
7984        lon_camera: 0_i32,
7985        alt_camera: 0_i32,
7986        lat_image: 0_i32,
7987        lon_image: 0_i32,
7988        alt_image: 0_i32,
7989        q: [0.0_f32; 4usize],
7990        hfov: 0.0_f32,
7991        vfov: 0.0_f32,
7992        camera_device_id: 0_u8,
7993    };
7994    #[cfg(feature = "arbitrary")]
7995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7996        use arbitrary::{Arbitrary, Unstructured};
7997        let mut buf = [0u8; 1024];
7998        rng.fill_bytes(&mut buf);
7999        let mut unstructured = Unstructured::new(&buf);
8000        Self::arbitrary(&mut unstructured).unwrap_or_default()
8001    }
8002}
8003impl Default for CAMERA_FOV_STATUS_DATA {
8004    fn default() -> Self {
8005        Self::DEFAULT.clone()
8006    }
8007}
8008impl MessageData for CAMERA_FOV_STATUS_DATA {
8009    type Message = MavMessage;
8010    const ID: u32 = 271u32;
8011    const NAME: &'static str = "CAMERA_FOV_STATUS";
8012    const EXTRA_CRC: u8 = 22u8;
8013    const ENCODED_LEN: usize = 53usize;
8014    fn deser(
8015        _version: MavlinkVersion,
8016        __input: &[u8],
8017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8018        let avail_len = __input.len();
8019        let mut payload_buf = [0; Self::ENCODED_LEN];
8020        let mut buf = if avail_len < Self::ENCODED_LEN {
8021            payload_buf[0..avail_len].copy_from_slice(__input);
8022            Bytes::new(&payload_buf)
8023        } else {
8024            Bytes::new(__input)
8025        };
8026        let mut __struct = Self::default();
8027        __struct.time_boot_ms = buf.get_u32_le();
8028        __struct.lat_camera = buf.get_i32_le();
8029        __struct.lon_camera = buf.get_i32_le();
8030        __struct.alt_camera = buf.get_i32_le();
8031        __struct.lat_image = buf.get_i32_le();
8032        __struct.lon_image = buf.get_i32_le();
8033        __struct.alt_image = buf.get_i32_le();
8034        for v in &mut __struct.q {
8035            let val = buf.get_f32_le();
8036            *v = val;
8037        }
8038        __struct.hfov = buf.get_f32_le();
8039        __struct.vfov = buf.get_f32_le();
8040        __struct.camera_device_id = buf.get_u8();
8041        Ok(__struct)
8042    }
8043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8044        let mut __tmp = BytesMut::new(bytes);
8045        #[allow(clippy::absurd_extreme_comparisons)]
8046        #[allow(unused_comparisons)]
8047        if __tmp.remaining() < Self::ENCODED_LEN {
8048            panic!(
8049                "buffer is too small (need {} bytes, but got {})",
8050                Self::ENCODED_LEN,
8051                __tmp.remaining(),
8052            )
8053        }
8054        __tmp.put_u32_le(self.time_boot_ms);
8055        __tmp.put_i32_le(self.lat_camera);
8056        __tmp.put_i32_le(self.lon_camera);
8057        __tmp.put_i32_le(self.alt_camera);
8058        __tmp.put_i32_le(self.lat_image);
8059        __tmp.put_i32_le(self.lon_image);
8060        __tmp.put_i32_le(self.alt_image);
8061        for val in &self.q {
8062            __tmp.put_f32_le(*val);
8063        }
8064        __tmp.put_f32_le(self.hfov);
8065        __tmp.put_f32_le(self.vfov);
8066        if matches!(version, MavlinkVersion::V2) {
8067            __tmp.put_u8(self.camera_device_id);
8068            let len = __tmp.len();
8069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8070        } else {
8071            __tmp.len()
8072        }
8073    }
8074}
8075#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
8076#[doc = ""]
8077#[doc = "ID: 263"]
8078#[derive(Debug, Clone, PartialEq)]
8079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8081#[cfg_attr(feature = "ts", derive(TS))]
8082#[cfg_attr(feature = "ts", ts(export))]
8083pub struct CAMERA_IMAGE_CAPTURED_DATA {
8084    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
8085    pub time_utc: u64,
8086    #[doc = "Timestamp (time since system boot)."]
8087    pub time_boot_ms: u32,
8088    #[doc = "Latitude where image was taken"]
8089    pub lat: i32,
8090    #[doc = "Longitude where capture was taken"]
8091    pub lon: i32,
8092    #[doc = "Altitude (MSL) where image was taken"]
8093    pub alt: i32,
8094    #[doc = "Altitude above ground"]
8095    pub relative_alt: i32,
8096    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8097    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8098    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8099    pub q: [f32; 4],
8100    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
8101    pub image_index: i32,
8102    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
8103    pub camera_id: u8,
8104    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
8105    pub capture_result: i8,
8106    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
8107    #[cfg_attr(feature = "ts", ts(type = "string"))]
8108    pub file_url: CharArray<205>,
8109}
8110impl CAMERA_IMAGE_CAPTURED_DATA {
8111    pub const ENCODED_LEN: usize = 255usize;
8112    pub const DEFAULT: Self = Self {
8113        time_utc: 0_u64,
8114        time_boot_ms: 0_u32,
8115        lat: 0_i32,
8116        lon: 0_i32,
8117        alt: 0_i32,
8118        relative_alt: 0_i32,
8119        q: [0.0_f32; 4usize],
8120        image_index: 0_i32,
8121        camera_id: 0_u8,
8122        capture_result: 0_i8,
8123        file_url: CharArray::new([0_u8; 205usize]),
8124    };
8125    #[cfg(feature = "arbitrary")]
8126    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8127        use arbitrary::{Arbitrary, Unstructured};
8128        let mut buf = [0u8; 1024];
8129        rng.fill_bytes(&mut buf);
8130        let mut unstructured = Unstructured::new(&buf);
8131        Self::arbitrary(&mut unstructured).unwrap_or_default()
8132    }
8133}
8134impl Default for CAMERA_IMAGE_CAPTURED_DATA {
8135    fn default() -> Self {
8136        Self::DEFAULT.clone()
8137    }
8138}
8139impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
8140    type Message = MavMessage;
8141    const ID: u32 = 263u32;
8142    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
8143    const EXTRA_CRC: u8 = 133u8;
8144    const ENCODED_LEN: usize = 255usize;
8145    fn deser(
8146        _version: MavlinkVersion,
8147        __input: &[u8],
8148    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8149        let avail_len = __input.len();
8150        let mut payload_buf = [0; Self::ENCODED_LEN];
8151        let mut buf = if avail_len < Self::ENCODED_LEN {
8152            payload_buf[0..avail_len].copy_from_slice(__input);
8153            Bytes::new(&payload_buf)
8154        } else {
8155            Bytes::new(__input)
8156        };
8157        let mut __struct = Self::default();
8158        __struct.time_utc = buf.get_u64_le();
8159        __struct.time_boot_ms = buf.get_u32_le();
8160        __struct.lat = buf.get_i32_le();
8161        __struct.lon = buf.get_i32_le();
8162        __struct.alt = buf.get_i32_le();
8163        __struct.relative_alt = buf.get_i32_le();
8164        for v in &mut __struct.q {
8165            let val = buf.get_f32_le();
8166            *v = val;
8167        }
8168        __struct.image_index = buf.get_i32_le();
8169        __struct.camera_id = buf.get_u8();
8170        __struct.capture_result = buf.get_i8();
8171        let mut tmp = [0_u8; 205usize];
8172        for v in &mut tmp {
8173            *v = buf.get_u8();
8174        }
8175        __struct.file_url = CharArray::new(tmp);
8176        Ok(__struct)
8177    }
8178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8179        let mut __tmp = BytesMut::new(bytes);
8180        #[allow(clippy::absurd_extreme_comparisons)]
8181        #[allow(unused_comparisons)]
8182        if __tmp.remaining() < Self::ENCODED_LEN {
8183            panic!(
8184                "buffer is too small (need {} bytes, but got {})",
8185                Self::ENCODED_LEN,
8186                __tmp.remaining(),
8187            )
8188        }
8189        __tmp.put_u64_le(self.time_utc);
8190        __tmp.put_u32_le(self.time_boot_ms);
8191        __tmp.put_i32_le(self.lat);
8192        __tmp.put_i32_le(self.lon);
8193        __tmp.put_i32_le(self.alt);
8194        __tmp.put_i32_le(self.relative_alt);
8195        for val in &self.q {
8196            __tmp.put_f32_le(*val);
8197        }
8198        __tmp.put_i32_le(self.image_index);
8199        __tmp.put_u8(self.camera_id);
8200        __tmp.put_i8(self.capture_result);
8201        for val in &self.file_url {
8202            __tmp.put_u8(*val);
8203        }
8204        if matches!(version, MavlinkVersion::V2) {
8205            let len = __tmp.len();
8206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8207        } else {
8208            __tmp.len()
8209        }
8210    }
8211}
8212#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8213#[doc = ""]
8214#[doc = "ID: 259"]
8215#[derive(Debug, Clone, PartialEq)]
8216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8218#[cfg_attr(feature = "ts", derive(TS))]
8219#[cfg_attr(feature = "ts", ts(export))]
8220pub struct CAMERA_INFORMATION_DATA {
8221    #[doc = "Timestamp (time since system boot)."]
8222    pub time_boot_ms: u32,
8223    #[doc = "0xff). Use 0 if not known."]
8224    pub firmware_version: u32,
8225    #[doc = "Focal length. Use NaN if not known."]
8226    pub focal_length: f32,
8227    #[doc = "Image sensor size horizontal. Use NaN if not known."]
8228    pub sensor_size_h: f32,
8229    #[doc = "Image sensor size vertical. Use NaN if not known."]
8230    pub sensor_size_v: f32,
8231    #[doc = "Bitmap of camera capability flags."]
8232    pub flags: CameraCapFlags,
8233    #[doc = "Horizontal image resolution. Use 0 if not known."]
8234    pub resolution_h: u16,
8235    #[doc = "Vertical image resolution. Use 0 if not known."]
8236    pub resolution_v: u16,
8237    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
8238    pub cam_definition_version: u16,
8239    #[doc = "Name of the camera vendor"]
8240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8242    pub vendor_name: [u8; 32],
8243    #[doc = "Name of the camera model"]
8244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8245    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8246    pub model_name: [u8; 32],
8247    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
8248    pub lens_id: u8,
8249    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
8250    #[cfg_attr(feature = "ts", ts(type = "string"))]
8251    pub cam_definition_uri: CharArray<140>,
8252    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
8253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8254    pub gimbal_device_id: u8,
8255    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8256    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8257    pub camera_device_id: u8,
8258}
8259impl CAMERA_INFORMATION_DATA {
8260    pub const ENCODED_LEN: usize = 237usize;
8261    pub const DEFAULT: Self = Self {
8262        time_boot_ms: 0_u32,
8263        firmware_version: 0_u32,
8264        focal_length: 0.0_f32,
8265        sensor_size_h: 0.0_f32,
8266        sensor_size_v: 0.0_f32,
8267        flags: CameraCapFlags::DEFAULT,
8268        resolution_h: 0_u16,
8269        resolution_v: 0_u16,
8270        cam_definition_version: 0_u16,
8271        vendor_name: [0_u8; 32usize],
8272        model_name: [0_u8; 32usize],
8273        lens_id: 0_u8,
8274        cam_definition_uri: CharArray::new([0_u8; 140usize]),
8275        gimbal_device_id: 0_u8,
8276        camera_device_id: 0_u8,
8277    };
8278    #[cfg(feature = "arbitrary")]
8279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8280        use arbitrary::{Arbitrary, Unstructured};
8281        let mut buf = [0u8; 1024];
8282        rng.fill_bytes(&mut buf);
8283        let mut unstructured = Unstructured::new(&buf);
8284        Self::arbitrary(&mut unstructured).unwrap_or_default()
8285    }
8286}
8287impl Default for CAMERA_INFORMATION_DATA {
8288    fn default() -> Self {
8289        Self::DEFAULT.clone()
8290    }
8291}
8292impl MessageData for CAMERA_INFORMATION_DATA {
8293    type Message = MavMessage;
8294    const ID: u32 = 259u32;
8295    const NAME: &'static str = "CAMERA_INFORMATION";
8296    const EXTRA_CRC: u8 = 92u8;
8297    const ENCODED_LEN: usize = 237usize;
8298    fn deser(
8299        _version: MavlinkVersion,
8300        __input: &[u8],
8301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8302        let avail_len = __input.len();
8303        let mut payload_buf = [0; Self::ENCODED_LEN];
8304        let mut buf = if avail_len < Self::ENCODED_LEN {
8305            payload_buf[0..avail_len].copy_from_slice(__input);
8306            Bytes::new(&payload_buf)
8307        } else {
8308            Bytes::new(__input)
8309        };
8310        let mut __struct = Self::default();
8311        __struct.time_boot_ms = buf.get_u32_le();
8312        __struct.firmware_version = buf.get_u32_le();
8313        __struct.focal_length = buf.get_f32_le();
8314        __struct.sensor_size_h = buf.get_f32_le();
8315        __struct.sensor_size_v = buf.get_f32_le();
8316        let tmp = buf.get_u32_le();
8317        __struct.flags = CameraCapFlags::from_bits(tmp).ok_or(
8318            ::mavlink_core::error::ParserError::InvalidFlag {
8319                flag_type: "CameraCapFlags",
8320                value: tmp as u64,
8321            },
8322        )?;
8323        __struct.resolution_h = buf.get_u16_le();
8324        __struct.resolution_v = buf.get_u16_le();
8325        __struct.cam_definition_version = buf.get_u16_le();
8326        for v in &mut __struct.vendor_name {
8327            let val = buf.get_u8();
8328            *v = val;
8329        }
8330        for v in &mut __struct.model_name {
8331            let val = buf.get_u8();
8332            *v = val;
8333        }
8334        __struct.lens_id = buf.get_u8();
8335        let mut tmp = [0_u8; 140usize];
8336        for v in &mut tmp {
8337            *v = buf.get_u8();
8338        }
8339        __struct.cam_definition_uri = CharArray::new(tmp);
8340        __struct.gimbal_device_id = buf.get_u8();
8341        __struct.camera_device_id = buf.get_u8();
8342        Ok(__struct)
8343    }
8344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8345        let mut __tmp = BytesMut::new(bytes);
8346        #[allow(clippy::absurd_extreme_comparisons)]
8347        #[allow(unused_comparisons)]
8348        if __tmp.remaining() < Self::ENCODED_LEN {
8349            panic!(
8350                "buffer is too small (need {} bytes, but got {})",
8351                Self::ENCODED_LEN,
8352                __tmp.remaining(),
8353            )
8354        }
8355        __tmp.put_u32_le(self.time_boot_ms);
8356        __tmp.put_u32_le(self.firmware_version);
8357        __tmp.put_f32_le(self.focal_length);
8358        __tmp.put_f32_le(self.sensor_size_h);
8359        __tmp.put_f32_le(self.sensor_size_v);
8360        __tmp.put_u32_le(self.flags.bits());
8361        __tmp.put_u16_le(self.resolution_h);
8362        __tmp.put_u16_le(self.resolution_v);
8363        __tmp.put_u16_le(self.cam_definition_version);
8364        for val in &self.vendor_name {
8365            __tmp.put_u8(*val);
8366        }
8367        for val in &self.model_name {
8368            __tmp.put_u8(*val);
8369        }
8370        __tmp.put_u8(self.lens_id);
8371        for val in &self.cam_definition_uri {
8372            __tmp.put_u8(*val);
8373        }
8374        if matches!(version, MavlinkVersion::V2) {
8375            __tmp.put_u8(self.gimbal_device_id);
8376            __tmp.put_u8(self.camera_device_id);
8377            let len = __tmp.len();
8378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8379        } else {
8380            __tmp.len()
8381        }
8382    }
8383}
8384#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8385#[doc = ""]
8386#[doc = "ID: 260"]
8387#[derive(Debug, Clone, PartialEq)]
8388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8390#[cfg_attr(feature = "ts", derive(TS))]
8391#[cfg_attr(feature = "ts", ts(export))]
8392pub struct CAMERA_SETTINGS_DATA {
8393    #[doc = "Timestamp (time since system boot)."]
8394    pub time_boot_ms: u32,
8395    #[doc = "Camera mode"]
8396    pub mode_id: CameraMode,
8397    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8399    pub zoomLevel: f32,
8400    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8402    pub focusLevel: f32,
8403    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8405    pub camera_device_id: u8,
8406}
8407impl CAMERA_SETTINGS_DATA {
8408    pub const ENCODED_LEN: usize = 14usize;
8409    pub const DEFAULT: Self = Self {
8410        time_boot_ms: 0_u32,
8411        mode_id: CameraMode::DEFAULT,
8412        zoomLevel: 0.0_f32,
8413        focusLevel: 0.0_f32,
8414        camera_device_id: 0_u8,
8415    };
8416    #[cfg(feature = "arbitrary")]
8417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8418        use arbitrary::{Arbitrary, Unstructured};
8419        let mut buf = [0u8; 1024];
8420        rng.fill_bytes(&mut buf);
8421        let mut unstructured = Unstructured::new(&buf);
8422        Self::arbitrary(&mut unstructured).unwrap_or_default()
8423    }
8424}
8425impl Default for CAMERA_SETTINGS_DATA {
8426    fn default() -> Self {
8427        Self::DEFAULT.clone()
8428    }
8429}
8430impl MessageData for CAMERA_SETTINGS_DATA {
8431    type Message = MavMessage;
8432    const ID: u32 = 260u32;
8433    const NAME: &'static str = "CAMERA_SETTINGS";
8434    const EXTRA_CRC: u8 = 146u8;
8435    const ENCODED_LEN: usize = 14usize;
8436    fn deser(
8437        _version: MavlinkVersion,
8438        __input: &[u8],
8439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8440        let avail_len = __input.len();
8441        let mut payload_buf = [0; Self::ENCODED_LEN];
8442        let mut buf = if avail_len < Self::ENCODED_LEN {
8443            payload_buf[0..avail_len].copy_from_slice(__input);
8444            Bytes::new(&payload_buf)
8445        } else {
8446            Bytes::new(__input)
8447        };
8448        let mut __struct = Self::default();
8449        __struct.time_boot_ms = buf.get_u32_le();
8450        let tmp = buf.get_u8();
8451        __struct.mode_id =
8452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8453                enum_type: "CameraMode",
8454                value: tmp as u64,
8455            })?;
8456        __struct.zoomLevel = buf.get_f32_le();
8457        __struct.focusLevel = buf.get_f32_le();
8458        __struct.camera_device_id = buf.get_u8();
8459        Ok(__struct)
8460    }
8461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8462        let mut __tmp = BytesMut::new(bytes);
8463        #[allow(clippy::absurd_extreme_comparisons)]
8464        #[allow(unused_comparisons)]
8465        if __tmp.remaining() < Self::ENCODED_LEN {
8466            panic!(
8467                "buffer is too small (need {} bytes, but got {})",
8468                Self::ENCODED_LEN,
8469                __tmp.remaining(),
8470            )
8471        }
8472        __tmp.put_u32_le(self.time_boot_ms);
8473        __tmp.put_u8(self.mode_id as u8);
8474        if matches!(version, MavlinkVersion::V2) {
8475            __tmp.put_f32_le(self.zoomLevel);
8476            __tmp.put_f32_le(self.focusLevel);
8477            __tmp.put_u8(self.camera_device_id);
8478            let len = __tmp.len();
8479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8480        } else {
8481            __tmp.len()
8482        }
8483    }
8484}
8485#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8486#[doc = ""]
8487#[doc = "ID: 277"]
8488#[derive(Debug, Clone, PartialEq)]
8489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8491#[cfg_attr(feature = "ts", derive(TS))]
8492#[cfg_attr(feature = "ts", ts(export))]
8493pub struct CAMERA_THERMAL_RANGE_DATA {
8494    #[doc = "Timestamp (time since system boot)."]
8495    pub time_boot_ms: u32,
8496    #[doc = "Temperature max."]
8497    pub max: f32,
8498    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8499    pub max_point_x: f32,
8500    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8501    pub max_point_y: f32,
8502    #[doc = "Temperature min."]
8503    pub min: f32,
8504    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8505    pub min_point_x: f32,
8506    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8507    pub min_point_y: f32,
8508    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8509    pub stream_id: u8,
8510    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8511    pub camera_device_id: u8,
8512}
8513impl CAMERA_THERMAL_RANGE_DATA {
8514    pub const ENCODED_LEN: usize = 30usize;
8515    pub const DEFAULT: Self = Self {
8516        time_boot_ms: 0_u32,
8517        max: 0.0_f32,
8518        max_point_x: 0.0_f32,
8519        max_point_y: 0.0_f32,
8520        min: 0.0_f32,
8521        min_point_x: 0.0_f32,
8522        min_point_y: 0.0_f32,
8523        stream_id: 0_u8,
8524        camera_device_id: 0_u8,
8525    };
8526    #[cfg(feature = "arbitrary")]
8527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8528        use arbitrary::{Arbitrary, Unstructured};
8529        let mut buf = [0u8; 1024];
8530        rng.fill_bytes(&mut buf);
8531        let mut unstructured = Unstructured::new(&buf);
8532        Self::arbitrary(&mut unstructured).unwrap_or_default()
8533    }
8534}
8535impl Default for CAMERA_THERMAL_RANGE_DATA {
8536    fn default() -> Self {
8537        Self::DEFAULT.clone()
8538    }
8539}
8540impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8541    type Message = MavMessage;
8542    const ID: u32 = 277u32;
8543    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8544    const EXTRA_CRC: u8 = 62u8;
8545    const ENCODED_LEN: usize = 30usize;
8546    fn deser(
8547        _version: MavlinkVersion,
8548        __input: &[u8],
8549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8550        let avail_len = __input.len();
8551        let mut payload_buf = [0; Self::ENCODED_LEN];
8552        let mut buf = if avail_len < Self::ENCODED_LEN {
8553            payload_buf[0..avail_len].copy_from_slice(__input);
8554            Bytes::new(&payload_buf)
8555        } else {
8556            Bytes::new(__input)
8557        };
8558        let mut __struct = Self::default();
8559        __struct.time_boot_ms = buf.get_u32_le();
8560        __struct.max = buf.get_f32_le();
8561        __struct.max_point_x = buf.get_f32_le();
8562        __struct.max_point_y = buf.get_f32_le();
8563        __struct.min = buf.get_f32_le();
8564        __struct.min_point_x = buf.get_f32_le();
8565        __struct.min_point_y = buf.get_f32_le();
8566        __struct.stream_id = buf.get_u8();
8567        __struct.camera_device_id = buf.get_u8();
8568        Ok(__struct)
8569    }
8570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8571        let mut __tmp = BytesMut::new(bytes);
8572        #[allow(clippy::absurd_extreme_comparisons)]
8573        #[allow(unused_comparisons)]
8574        if __tmp.remaining() < Self::ENCODED_LEN {
8575            panic!(
8576                "buffer is too small (need {} bytes, but got {})",
8577                Self::ENCODED_LEN,
8578                __tmp.remaining(),
8579            )
8580        }
8581        __tmp.put_u32_le(self.time_boot_ms);
8582        __tmp.put_f32_le(self.max);
8583        __tmp.put_f32_le(self.max_point_x);
8584        __tmp.put_f32_le(self.max_point_y);
8585        __tmp.put_f32_le(self.min);
8586        __tmp.put_f32_le(self.min_point_x);
8587        __tmp.put_f32_le(self.min_point_y);
8588        __tmp.put_u8(self.stream_id);
8589        __tmp.put_u8(self.camera_device_id);
8590        if matches!(version, MavlinkVersion::V2) {
8591            let len = __tmp.len();
8592            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8593        } else {
8594            __tmp.len()
8595        }
8596    }
8597}
8598#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8599#[doc = ""]
8600#[doc = "ID: 276"]
8601#[derive(Debug, Clone, PartialEq)]
8602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8604#[cfg_attr(feature = "ts", derive(TS))]
8605#[cfg_attr(feature = "ts", ts(export))]
8606pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8607    #[doc = "Latitude of tracked object"]
8608    pub lat: i32,
8609    #[doc = "Longitude of tracked object"]
8610    pub lon: i32,
8611    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8612    pub alt: f32,
8613    #[doc = "Horizontal accuracy. NAN if unknown"]
8614    pub h_acc: f32,
8615    #[doc = "Vertical accuracy. NAN if unknown"]
8616    pub v_acc: f32,
8617    #[doc = "North velocity of tracked object. NAN if unknown"]
8618    pub vel_n: f32,
8619    #[doc = "East velocity of tracked object. NAN if unknown"]
8620    pub vel_e: f32,
8621    #[doc = "Down velocity of tracked object. NAN if unknown"]
8622    pub vel_d: f32,
8623    #[doc = "Velocity accuracy. NAN if unknown"]
8624    pub vel_acc: f32,
8625    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8626    pub dist: f32,
8627    #[doc = "Heading in radians, in NED. NAN if unknown"]
8628    pub hdg: f32,
8629    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8630    pub hdg_acc: f32,
8631    #[doc = "Current tracking status"]
8632    pub tracking_status: CameraTrackingStatusFlags,
8633    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8635    pub camera_device_id: u8,
8636}
8637impl CAMERA_TRACKING_GEO_STATUS_DATA {
8638    pub const ENCODED_LEN: usize = 50usize;
8639    pub const DEFAULT: Self = Self {
8640        lat: 0_i32,
8641        lon: 0_i32,
8642        alt: 0.0_f32,
8643        h_acc: 0.0_f32,
8644        v_acc: 0.0_f32,
8645        vel_n: 0.0_f32,
8646        vel_e: 0.0_f32,
8647        vel_d: 0.0_f32,
8648        vel_acc: 0.0_f32,
8649        dist: 0.0_f32,
8650        hdg: 0.0_f32,
8651        hdg_acc: 0.0_f32,
8652        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8653        camera_device_id: 0_u8,
8654    };
8655    #[cfg(feature = "arbitrary")]
8656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8657        use arbitrary::{Arbitrary, Unstructured};
8658        let mut buf = [0u8; 1024];
8659        rng.fill_bytes(&mut buf);
8660        let mut unstructured = Unstructured::new(&buf);
8661        Self::arbitrary(&mut unstructured).unwrap_or_default()
8662    }
8663}
8664impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8665    fn default() -> Self {
8666        Self::DEFAULT.clone()
8667    }
8668}
8669impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8670    type Message = MavMessage;
8671    const ID: u32 = 276u32;
8672    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8673    const EXTRA_CRC: u8 = 18u8;
8674    const ENCODED_LEN: usize = 50usize;
8675    fn deser(
8676        _version: MavlinkVersion,
8677        __input: &[u8],
8678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8679        let avail_len = __input.len();
8680        let mut payload_buf = [0; Self::ENCODED_LEN];
8681        let mut buf = if avail_len < Self::ENCODED_LEN {
8682            payload_buf[0..avail_len].copy_from_slice(__input);
8683            Bytes::new(&payload_buf)
8684        } else {
8685            Bytes::new(__input)
8686        };
8687        let mut __struct = Self::default();
8688        __struct.lat = buf.get_i32_le();
8689        __struct.lon = buf.get_i32_le();
8690        __struct.alt = buf.get_f32_le();
8691        __struct.h_acc = buf.get_f32_le();
8692        __struct.v_acc = buf.get_f32_le();
8693        __struct.vel_n = buf.get_f32_le();
8694        __struct.vel_e = buf.get_f32_le();
8695        __struct.vel_d = buf.get_f32_le();
8696        __struct.vel_acc = buf.get_f32_le();
8697        __struct.dist = buf.get_f32_le();
8698        __struct.hdg = buf.get_f32_le();
8699        __struct.hdg_acc = buf.get_f32_le();
8700        let tmp = buf.get_u8();
8701        __struct.tracking_status =
8702            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8703                enum_type: "CameraTrackingStatusFlags",
8704                value: tmp as u64,
8705            })?;
8706        __struct.camera_device_id = buf.get_u8();
8707        Ok(__struct)
8708    }
8709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8710        let mut __tmp = BytesMut::new(bytes);
8711        #[allow(clippy::absurd_extreme_comparisons)]
8712        #[allow(unused_comparisons)]
8713        if __tmp.remaining() < Self::ENCODED_LEN {
8714            panic!(
8715                "buffer is too small (need {} bytes, but got {})",
8716                Self::ENCODED_LEN,
8717                __tmp.remaining(),
8718            )
8719        }
8720        __tmp.put_i32_le(self.lat);
8721        __tmp.put_i32_le(self.lon);
8722        __tmp.put_f32_le(self.alt);
8723        __tmp.put_f32_le(self.h_acc);
8724        __tmp.put_f32_le(self.v_acc);
8725        __tmp.put_f32_le(self.vel_n);
8726        __tmp.put_f32_le(self.vel_e);
8727        __tmp.put_f32_le(self.vel_d);
8728        __tmp.put_f32_le(self.vel_acc);
8729        __tmp.put_f32_le(self.dist);
8730        __tmp.put_f32_le(self.hdg);
8731        __tmp.put_f32_le(self.hdg_acc);
8732        __tmp.put_u8(self.tracking_status as u8);
8733        if matches!(version, MavlinkVersion::V2) {
8734            __tmp.put_u8(self.camera_device_id);
8735            let len = __tmp.len();
8736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8737        } else {
8738            __tmp.len()
8739        }
8740    }
8741}
8742#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8743#[doc = ""]
8744#[doc = "ID: 275"]
8745#[derive(Debug, Clone, PartialEq)]
8746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8748#[cfg_attr(feature = "ts", derive(TS))]
8749#[cfg_attr(feature = "ts", ts(export))]
8750pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8751    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8752    pub point_x: f32,
8753    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8754    pub point_y: f32,
8755    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8756    pub radius: f32,
8757    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8758    pub rec_top_x: f32,
8759    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8760    pub rec_top_y: f32,
8761    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8762    pub rec_bottom_x: f32,
8763    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8764    pub rec_bottom_y: f32,
8765    #[doc = "Current tracking status"]
8766    pub tracking_status: CameraTrackingStatusFlags,
8767    #[doc = "Current tracking mode"]
8768    pub tracking_mode: CameraTrackingMode,
8769    #[doc = "Defines location of target data"]
8770    pub target_data: CameraTrackingTargetData,
8771    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8773    pub camera_device_id: u8,
8774}
8775impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8776    pub const ENCODED_LEN: usize = 32usize;
8777    pub const DEFAULT: Self = Self {
8778        point_x: 0.0_f32,
8779        point_y: 0.0_f32,
8780        radius: 0.0_f32,
8781        rec_top_x: 0.0_f32,
8782        rec_top_y: 0.0_f32,
8783        rec_bottom_x: 0.0_f32,
8784        rec_bottom_y: 0.0_f32,
8785        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8786        tracking_mode: CameraTrackingMode::DEFAULT,
8787        target_data: CameraTrackingTargetData::DEFAULT,
8788        camera_device_id: 0_u8,
8789    };
8790    #[cfg(feature = "arbitrary")]
8791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8792        use arbitrary::{Arbitrary, Unstructured};
8793        let mut buf = [0u8; 1024];
8794        rng.fill_bytes(&mut buf);
8795        let mut unstructured = Unstructured::new(&buf);
8796        Self::arbitrary(&mut unstructured).unwrap_or_default()
8797    }
8798}
8799impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8800    fn default() -> Self {
8801        Self::DEFAULT.clone()
8802    }
8803}
8804impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8805    type Message = MavMessage;
8806    const ID: u32 = 275u32;
8807    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8808    const EXTRA_CRC: u8 = 126u8;
8809    const ENCODED_LEN: usize = 32usize;
8810    fn deser(
8811        _version: MavlinkVersion,
8812        __input: &[u8],
8813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8814        let avail_len = __input.len();
8815        let mut payload_buf = [0; Self::ENCODED_LEN];
8816        let mut buf = if avail_len < Self::ENCODED_LEN {
8817            payload_buf[0..avail_len].copy_from_slice(__input);
8818            Bytes::new(&payload_buf)
8819        } else {
8820            Bytes::new(__input)
8821        };
8822        let mut __struct = Self::default();
8823        __struct.point_x = buf.get_f32_le();
8824        __struct.point_y = buf.get_f32_le();
8825        __struct.radius = buf.get_f32_le();
8826        __struct.rec_top_x = buf.get_f32_le();
8827        __struct.rec_top_y = buf.get_f32_le();
8828        __struct.rec_bottom_x = buf.get_f32_le();
8829        __struct.rec_bottom_y = buf.get_f32_le();
8830        let tmp = buf.get_u8();
8831        __struct.tracking_status =
8832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8833                enum_type: "CameraTrackingStatusFlags",
8834                value: tmp as u64,
8835            })?;
8836        let tmp = buf.get_u8();
8837        __struct.tracking_mode =
8838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8839                enum_type: "CameraTrackingMode",
8840                value: tmp as u64,
8841            })?;
8842        let tmp = buf.get_u8();
8843        __struct.target_data = CameraTrackingTargetData::from_bits(tmp).ok_or(
8844            ::mavlink_core::error::ParserError::InvalidFlag {
8845                flag_type: "CameraTrackingTargetData",
8846                value: tmp as u64,
8847            },
8848        )?;
8849        __struct.camera_device_id = buf.get_u8();
8850        Ok(__struct)
8851    }
8852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8853        let mut __tmp = BytesMut::new(bytes);
8854        #[allow(clippy::absurd_extreme_comparisons)]
8855        #[allow(unused_comparisons)]
8856        if __tmp.remaining() < Self::ENCODED_LEN {
8857            panic!(
8858                "buffer is too small (need {} bytes, but got {})",
8859                Self::ENCODED_LEN,
8860                __tmp.remaining(),
8861            )
8862        }
8863        __tmp.put_f32_le(self.point_x);
8864        __tmp.put_f32_le(self.point_y);
8865        __tmp.put_f32_le(self.radius);
8866        __tmp.put_f32_le(self.rec_top_x);
8867        __tmp.put_f32_le(self.rec_top_y);
8868        __tmp.put_f32_le(self.rec_bottom_x);
8869        __tmp.put_f32_le(self.rec_bottom_y);
8870        __tmp.put_u8(self.tracking_status as u8);
8871        __tmp.put_u8(self.tracking_mode as u8);
8872        __tmp.put_u8(self.target_data.bits());
8873        if matches!(version, MavlinkVersion::V2) {
8874            __tmp.put_u8(self.camera_device_id);
8875            let len = __tmp.len();
8876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8877        } else {
8878            __tmp.len()
8879        }
8880    }
8881}
8882#[doc = "Camera-IMU triggering and synchronisation message."]
8883#[doc = ""]
8884#[doc = "ID: 112"]
8885#[derive(Debug, Clone, PartialEq)]
8886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8888#[cfg_attr(feature = "ts", derive(TS))]
8889#[cfg_attr(feature = "ts", ts(export))]
8890pub struct CAMERA_TRIGGER_DATA {
8891    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8892    pub time_usec: u64,
8893    #[doc = "Image frame sequence"]
8894    pub seq: u32,
8895}
8896impl CAMERA_TRIGGER_DATA {
8897    pub const ENCODED_LEN: usize = 12usize;
8898    pub const DEFAULT: Self = Self {
8899        time_usec: 0_u64,
8900        seq: 0_u32,
8901    };
8902    #[cfg(feature = "arbitrary")]
8903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8904        use arbitrary::{Arbitrary, Unstructured};
8905        let mut buf = [0u8; 1024];
8906        rng.fill_bytes(&mut buf);
8907        let mut unstructured = Unstructured::new(&buf);
8908        Self::arbitrary(&mut unstructured).unwrap_or_default()
8909    }
8910}
8911impl Default for CAMERA_TRIGGER_DATA {
8912    fn default() -> Self {
8913        Self::DEFAULT.clone()
8914    }
8915}
8916impl MessageData for CAMERA_TRIGGER_DATA {
8917    type Message = MavMessage;
8918    const ID: u32 = 112u32;
8919    const NAME: &'static str = "CAMERA_TRIGGER";
8920    const EXTRA_CRC: u8 = 174u8;
8921    const ENCODED_LEN: usize = 12usize;
8922    fn deser(
8923        _version: MavlinkVersion,
8924        __input: &[u8],
8925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8926        let avail_len = __input.len();
8927        let mut payload_buf = [0; Self::ENCODED_LEN];
8928        let mut buf = if avail_len < Self::ENCODED_LEN {
8929            payload_buf[0..avail_len].copy_from_slice(__input);
8930            Bytes::new(&payload_buf)
8931        } else {
8932            Bytes::new(__input)
8933        };
8934        let mut __struct = Self::default();
8935        __struct.time_usec = buf.get_u64_le();
8936        __struct.seq = buf.get_u32_le();
8937        Ok(__struct)
8938    }
8939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8940        let mut __tmp = BytesMut::new(bytes);
8941        #[allow(clippy::absurd_extreme_comparisons)]
8942        #[allow(unused_comparisons)]
8943        if __tmp.remaining() < Self::ENCODED_LEN {
8944            panic!(
8945                "buffer is too small (need {} bytes, but got {})",
8946                Self::ENCODED_LEN,
8947                __tmp.remaining(),
8948            )
8949        }
8950        __tmp.put_u64_le(self.time_usec);
8951        __tmp.put_u32_le(self.seq);
8952        if matches!(version, MavlinkVersion::V2) {
8953            let len = __tmp.len();
8954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8955        } else {
8956            __tmp.len()
8957        }
8958    }
8959}
8960#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8961#[doc = ""]
8962#[doc = "ID: 387"]
8963#[derive(Debug, Clone, PartialEq)]
8964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8966#[cfg_attr(feature = "ts", derive(TS))]
8967#[cfg_attr(feature = "ts", ts(export))]
8968pub struct CANFD_FRAME_DATA {
8969    #[doc = "Frame ID"]
8970    pub id: u32,
8971    #[doc = "System ID."]
8972    pub target_system: u8,
8973    #[doc = "Component ID."]
8974    pub target_component: u8,
8975    #[doc = "bus number"]
8976    pub bus: u8,
8977    #[doc = "Frame length"]
8978    pub len: u8,
8979    #[doc = "Frame data"]
8980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8981    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8982    pub data: [u8; 64],
8983}
8984impl CANFD_FRAME_DATA {
8985    pub const ENCODED_LEN: usize = 72usize;
8986    pub const DEFAULT: Self = Self {
8987        id: 0_u32,
8988        target_system: 0_u8,
8989        target_component: 0_u8,
8990        bus: 0_u8,
8991        len: 0_u8,
8992        data: [0_u8; 64usize],
8993    };
8994    #[cfg(feature = "arbitrary")]
8995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8996        use arbitrary::{Arbitrary, Unstructured};
8997        let mut buf = [0u8; 1024];
8998        rng.fill_bytes(&mut buf);
8999        let mut unstructured = Unstructured::new(&buf);
9000        Self::arbitrary(&mut unstructured).unwrap_or_default()
9001    }
9002}
9003impl Default for CANFD_FRAME_DATA {
9004    fn default() -> Self {
9005        Self::DEFAULT.clone()
9006    }
9007}
9008impl MessageData for CANFD_FRAME_DATA {
9009    type Message = MavMessage;
9010    const ID: u32 = 387u32;
9011    const NAME: &'static str = "CANFD_FRAME";
9012    const EXTRA_CRC: u8 = 4u8;
9013    const ENCODED_LEN: usize = 72usize;
9014    fn deser(
9015        _version: MavlinkVersion,
9016        __input: &[u8],
9017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9018        let avail_len = __input.len();
9019        let mut payload_buf = [0; Self::ENCODED_LEN];
9020        let mut buf = if avail_len < Self::ENCODED_LEN {
9021            payload_buf[0..avail_len].copy_from_slice(__input);
9022            Bytes::new(&payload_buf)
9023        } else {
9024            Bytes::new(__input)
9025        };
9026        let mut __struct = Self::default();
9027        __struct.id = buf.get_u32_le();
9028        __struct.target_system = buf.get_u8();
9029        __struct.target_component = buf.get_u8();
9030        __struct.bus = buf.get_u8();
9031        __struct.len = buf.get_u8();
9032        for v in &mut __struct.data {
9033            let val = buf.get_u8();
9034            *v = val;
9035        }
9036        Ok(__struct)
9037    }
9038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9039        let mut __tmp = BytesMut::new(bytes);
9040        #[allow(clippy::absurd_extreme_comparisons)]
9041        #[allow(unused_comparisons)]
9042        if __tmp.remaining() < Self::ENCODED_LEN {
9043            panic!(
9044                "buffer is too small (need {} bytes, but got {})",
9045                Self::ENCODED_LEN,
9046                __tmp.remaining(),
9047            )
9048        }
9049        __tmp.put_u32_le(self.id);
9050        __tmp.put_u8(self.target_system);
9051        __tmp.put_u8(self.target_component);
9052        __tmp.put_u8(self.bus);
9053        __tmp.put_u8(self.len);
9054        for val in &self.data {
9055            __tmp.put_u8(*val);
9056        }
9057        if matches!(version, MavlinkVersion::V2) {
9058            let len = __tmp.len();
9059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9060        } else {
9061            __tmp.len()
9062        }
9063    }
9064}
9065#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
9066#[doc = ""]
9067#[doc = "ID: 388"]
9068#[derive(Debug, Clone, PartialEq)]
9069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9071#[cfg_attr(feature = "ts", derive(TS))]
9072#[cfg_attr(feature = "ts", ts(export))]
9073pub struct CAN_FILTER_MODIFY_DATA {
9074    #[doc = "filter IDs, length num_ids"]
9075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9076    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9077    pub ids: [u16; 16],
9078    #[doc = "System ID."]
9079    pub target_system: u8,
9080    #[doc = "Component ID."]
9081    pub target_component: u8,
9082    #[doc = "bus number"]
9083    pub bus: u8,
9084    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
9085    pub operation: CanFilterOp,
9086    #[doc = "number of IDs in filter list"]
9087    pub num_ids: u8,
9088}
9089impl CAN_FILTER_MODIFY_DATA {
9090    pub const ENCODED_LEN: usize = 37usize;
9091    pub const DEFAULT: Self = Self {
9092        ids: [0_u16; 16usize],
9093        target_system: 0_u8,
9094        target_component: 0_u8,
9095        bus: 0_u8,
9096        operation: CanFilterOp::DEFAULT,
9097        num_ids: 0_u8,
9098    };
9099    #[cfg(feature = "arbitrary")]
9100    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9101        use arbitrary::{Arbitrary, Unstructured};
9102        let mut buf = [0u8; 1024];
9103        rng.fill_bytes(&mut buf);
9104        let mut unstructured = Unstructured::new(&buf);
9105        Self::arbitrary(&mut unstructured).unwrap_or_default()
9106    }
9107}
9108impl Default for CAN_FILTER_MODIFY_DATA {
9109    fn default() -> Self {
9110        Self::DEFAULT.clone()
9111    }
9112}
9113impl MessageData for CAN_FILTER_MODIFY_DATA {
9114    type Message = MavMessage;
9115    const ID: u32 = 388u32;
9116    const NAME: &'static str = "CAN_FILTER_MODIFY";
9117    const EXTRA_CRC: u8 = 8u8;
9118    const ENCODED_LEN: usize = 37usize;
9119    fn deser(
9120        _version: MavlinkVersion,
9121        __input: &[u8],
9122    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9123        let avail_len = __input.len();
9124        let mut payload_buf = [0; Self::ENCODED_LEN];
9125        let mut buf = if avail_len < Self::ENCODED_LEN {
9126            payload_buf[0..avail_len].copy_from_slice(__input);
9127            Bytes::new(&payload_buf)
9128        } else {
9129            Bytes::new(__input)
9130        };
9131        let mut __struct = Self::default();
9132        for v in &mut __struct.ids {
9133            let val = buf.get_u16_le();
9134            *v = val;
9135        }
9136        __struct.target_system = buf.get_u8();
9137        __struct.target_component = buf.get_u8();
9138        __struct.bus = buf.get_u8();
9139        let tmp = buf.get_u8();
9140        __struct.operation =
9141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9142                enum_type: "CanFilterOp",
9143                value: tmp as u64,
9144            })?;
9145        __struct.num_ids = buf.get_u8();
9146        Ok(__struct)
9147    }
9148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9149        let mut __tmp = BytesMut::new(bytes);
9150        #[allow(clippy::absurd_extreme_comparisons)]
9151        #[allow(unused_comparisons)]
9152        if __tmp.remaining() < Self::ENCODED_LEN {
9153            panic!(
9154                "buffer is too small (need {} bytes, but got {})",
9155                Self::ENCODED_LEN,
9156                __tmp.remaining(),
9157            )
9158        }
9159        for val in &self.ids {
9160            __tmp.put_u16_le(*val);
9161        }
9162        __tmp.put_u8(self.target_system);
9163        __tmp.put_u8(self.target_component);
9164        __tmp.put_u8(self.bus);
9165        __tmp.put_u8(self.operation as u8);
9166        __tmp.put_u8(self.num_ids);
9167        if matches!(version, MavlinkVersion::V2) {
9168            let len = __tmp.len();
9169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9170        } else {
9171            __tmp.len()
9172        }
9173    }
9174}
9175#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
9176#[doc = ""]
9177#[doc = "ID: 386"]
9178#[derive(Debug, Clone, PartialEq)]
9179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9181#[cfg_attr(feature = "ts", derive(TS))]
9182#[cfg_attr(feature = "ts", ts(export))]
9183pub struct CAN_FRAME_DATA {
9184    #[doc = "Frame ID"]
9185    pub id: u32,
9186    #[doc = "System ID."]
9187    pub target_system: u8,
9188    #[doc = "Component ID."]
9189    pub target_component: u8,
9190    #[doc = "Bus number"]
9191    pub bus: u8,
9192    #[doc = "Frame length"]
9193    pub len: u8,
9194    #[doc = "Frame data"]
9195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9196    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9197    pub data: [u8; 8],
9198}
9199impl CAN_FRAME_DATA {
9200    pub const ENCODED_LEN: usize = 16usize;
9201    pub const DEFAULT: Self = Self {
9202        id: 0_u32,
9203        target_system: 0_u8,
9204        target_component: 0_u8,
9205        bus: 0_u8,
9206        len: 0_u8,
9207        data: [0_u8; 8usize],
9208    };
9209    #[cfg(feature = "arbitrary")]
9210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9211        use arbitrary::{Arbitrary, Unstructured};
9212        let mut buf = [0u8; 1024];
9213        rng.fill_bytes(&mut buf);
9214        let mut unstructured = Unstructured::new(&buf);
9215        Self::arbitrary(&mut unstructured).unwrap_or_default()
9216    }
9217}
9218impl Default for CAN_FRAME_DATA {
9219    fn default() -> Self {
9220        Self::DEFAULT.clone()
9221    }
9222}
9223impl MessageData for CAN_FRAME_DATA {
9224    type Message = MavMessage;
9225    const ID: u32 = 386u32;
9226    const NAME: &'static str = "CAN_FRAME";
9227    const EXTRA_CRC: u8 = 132u8;
9228    const ENCODED_LEN: usize = 16usize;
9229    fn deser(
9230        _version: MavlinkVersion,
9231        __input: &[u8],
9232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9233        let avail_len = __input.len();
9234        let mut payload_buf = [0; Self::ENCODED_LEN];
9235        let mut buf = if avail_len < Self::ENCODED_LEN {
9236            payload_buf[0..avail_len].copy_from_slice(__input);
9237            Bytes::new(&payload_buf)
9238        } else {
9239            Bytes::new(__input)
9240        };
9241        let mut __struct = Self::default();
9242        __struct.id = buf.get_u32_le();
9243        __struct.target_system = buf.get_u8();
9244        __struct.target_component = buf.get_u8();
9245        __struct.bus = buf.get_u8();
9246        __struct.len = buf.get_u8();
9247        for v in &mut __struct.data {
9248            let val = buf.get_u8();
9249            *v = val;
9250        }
9251        Ok(__struct)
9252    }
9253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9254        let mut __tmp = BytesMut::new(bytes);
9255        #[allow(clippy::absurd_extreme_comparisons)]
9256        #[allow(unused_comparisons)]
9257        if __tmp.remaining() < Self::ENCODED_LEN {
9258            panic!(
9259                "buffer is too small (need {} bytes, but got {})",
9260                Self::ENCODED_LEN,
9261                __tmp.remaining(),
9262            )
9263        }
9264        __tmp.put_u32_le(self.id);
9265        __tmp.put_u8(self.target_system);
9266        __tmp.put_u8(self.target_component);
9267        __tmp.put_u8(self.bus);
9268        __tmp.put_u8(self.len);
9269        for val in &self.data {
9270            __tmp.put_u8(*val);
9271        }
9272        if matches!(version, MavlinkVersion::V2) {
9273            let len = __tmp.len();
9274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9275        } else {
9276            __tmp.len()
9277        }
9278    }
9279}
9280#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
9281#[doc = ""]
9282#[doc = "ID: 336"]
9283#[derive(Debug, Clone, PartialEq)]
9284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9286#[cfg_attr(feature = "ts", derive(TS))]
9287#[cfg_attr(feature = "ts", ts(export))]
9288pub struct CELLULAR_CONFIG_DATA {
9289    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
9290    pub enable_lte: u8,
9291    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
9292    pub enable_pin: u8,
9293    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
9294    #[cfg_attr(feature = "ts", ts(type = "string"))]
9295    pub pin: CharArray<16>,
9296    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
9297    #[cfg_attr(feature = "ts", ts(type = "string"))]
9298    pub new_pin: CharArray<16>,
9299    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
9300    #[cfg_attr(feature = "ts", ts(type = "string"))]
9301    pub apn: CharArray<32>,
9302    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
9303    #[cfg_attr(feature = "ts", ts(type = "string"))]
9304    pub puk: CharArray<16>,
9305    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
9306    pub roaming: u8,
9307    #[doc = "Message acceptance response (sent back to GS)."]
9308    pub response: CellularConfigResponse,
9309}
9310impl CELLULAR_CONFIG_DATA {
9311    pub const ENCODED_LEN: usize = 84usize;
9312    pub const DEFAULT: Self = Self {
9313        enable_lte: 0_u8,
9314        enable_pin: 0_u8,
9315        pin: CharArray::new([0_u8; 16usize]),
9316        new_pin: CharArray::new([0_u8; 16usize]),
9317        apn: CharArray::new([0_u8; 32usize]),
9318        puk: CharArray::new([0_u8; 16usize]),
9319        roaming: 0_u8,
9320        response: CellularConfigResponse::DEFAULT,
9321    };
9322    #[cfg(feature = "arbitrary")]
9323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9324        use arbitrary::{Arbitrary, Unstructured};
9325        let mut buf = [0u8; 1024];
9326        rng.fill_bytes(&mut buf);
9327        let mut unstructured = Unstructured::new(&buf);
9328        Self::arbitrary(&mut unstructured).unwrap_or_default()
9329    }
9330}
9331impl Default for CELLULAR_CONFIG_DATA {
9332    fn default() -> Self {
9333        Self::DEFAULT.clone()
9334    }
9335}
9336impl MessageData for CELLULAR_CONFIG_DATA {
9337    type Message = MavMessage;
9338    const ID: u32 = 336u32;
9339    const NAME: &'static str = "CELLULAR_CONFIG";
9340    const EXTRA_CRC: u8 = 245u8;
9341    const ENCODED_LEN: usize = 84usize;
9342    fn deser(
9343        _version: MavlinkVersion,
9344        __input: &[u8],
9345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9346        let avail_len = __input.len();
9347        let mut payload_buf = [0; Self::ENCODED_LEN];
9348        let mut buf = if avail_len < Self::ENCODED_LEN {
9349            payload_buf[0..avail_len].copy_from_slice(__input);
9350            Bytes::new(&payload_buf)
9351        } else {
9352            Bytes::new(__input)
9353        };
9354        let mut __struct = Self::default();
9355        __struct.enable_lte = buf.get_u8();
9356        __struct.enable_pin = buf.get_u8();
9357        let mut tmp = [0_u8; 16usize];
9358        for v in &mut tmp {
9359            *v = buf.get_u8();
9360        }
9361        __struct.pin = CharArray::new(tmp);
9362        let mut tmp = [0_u8; 16usize];
9363        for v in &mut tmp {
9364            *v = buf.get_u8();
9365        }
9366        __struct.new_pin = CharArray::new(tmp);
9367        let mut tmp = [0_u8; 32usize];
9368        for v in &mut tmp {
9369            *v = buf.get_u8();
9370        }
9371        __struct.apn = CharArray::new(tmp);
9372        let mut tmp = [0_u8; 16usize];
9373        for v in &mut tmp {
9374            *v = buf.get_u8();
9375        }
9376        __struct.puk = CharArray::new(tmp);
9377        __struct.roaming = buf.get_u8();
9378        let tmp = buf.get_u8();
9379        __struct.response =
9380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9381                enum_type: "CellularConfigResponse",
9382                value: tmp as u64,
9383            })?;
9384        Ok(__struct)
9385    }
9386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9387        let mut __tmp = BytesMut::new(bytes);
9388        #[allow(clippy::absurd_extreme_comparisons)]
9389        #[allow(unused_comparisons)]
9390        if __tmp.remaining() < Self::ENCODED_LEN {
9391            panic!(
9392                "buffer is too small (need {} bytes, but got {})",
9393                Self::ENCODED_LEN,
9394                __tmp.remaining(),
9395            )
9396        }
9397        __tmp.put_u8(self.enable_lte);
9398        __tmp.put_u8(self.enable_pin);
9399        for val in &self.pin {
9400            __tmp.put_u8(*val);
9401        }
9402        for val in &self.new_pin {
9403            __tmp.put_u8(*val);
9404        }
9405        for val in &self.apn {
9406            __tmp.put_u8(*val);
9407        }
9408        for val in &self.puk {
9409            __tmp.put_u8(*val);
9410        }
9411        __tmp.put_u8(self.roaming);
9412        __tmp.put_u8(self.response as u8);
9413        if matches!(version, MavlinkVersion::V2) {
9414            let len = __tmp.len();
9415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9416        } else {
9417            __tmp.len()
9418        }
9419    }
9420}
9421#[doc = "Report current used cellular network status."]
9422#[doc = ""]
9423#[doc = "ID: 334"]
9424#[derive(Debug, Clone, PartialEq)]
9425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9427#[cfg_attr(feature = "ts", derive(TS))]
9428#[cfg_attr(feature = "ts", ts(export))]
9429pub struct CELLULAR_STATUS_DATA {
9430    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9431    pub mcc: u16,
9432    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9433    pub mnc: u16,
9434    #[doc = "Location area code. If unknown, set to 0"]
9435    pub lac: u16,
9436    #[doc = "Cellular modem status"]
9437    pub status: CellularStatusFlag,
9438    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9439    pub failure_reason: CellularNetworkFailedReason,
9440    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9441    pub mavtype: CellularNetworkRadioType,
9442    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9443    pub quality: u8,
9444}
9445impl CELLULAR_STATUS_DATA {
9446    pub const ENCODED_LEN: usize = 10usize;
9447    pub const DEFAULT: Self = Self {
9448        mcc: 0_u16,
9449        mnc: 0_u16,
9450        lac: 0_u16,
9451        status: CellularStatusFlag::DEFAULT,
9452        failure_reason: CellularNetworkFailedReason::DEFAULT,
9453        mavtype: CellularNetworkRadioType::DEFAULT,
9454        quality: 0_u8,
9455    };
9456    #[cfg(feature = "arbitrary")]
9457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9458        use arbitrary::{Arbitrary, Unstructured};
9459        let mut buf = [0u8; 1024];
9460        rng.fill_bytes(&mut buf);
9461        let mut unstructured = Unstructured::new(&buf);
9462        Self::arbitrary(&mut unstructured).unwrap_or_default()
9463    }
9464}
9465impl Default for CELLULAR_STATUS_DATA {
9466    fn default() -> Self {
9467        Self::DEFAULT.clone()
9468    }
9469}
9470impl MessageData for CELLULAR_STATUS_DATA {
9471    type Message = MavMessage;
9472    const ID: u32 = 334u32;
9473    const NAME: &'static str = "CELLULAR_STATUS";
9474    const EXTRA_CRC: u8 = 72u8;
9475    const ENCODED_LEN: usize = 10usize;
9476    fn deser(
9477        _version: MavlinkVersion,
9478        __input: &[u8],
9479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9480        let avail_len = __input.len();
9481        let mut payload_buf = [0; Self::ENCODED_LEN];
9482        let mut buf = if avail_len < Self::ENCODED_LEN {
9483            payload_buf[0..avail_len].copy_from_slice(__input);
9484            Bytes::new(&payload_buf)
9485        } else {
9486            Bytes::new(__input)
9487        };
9488        let mut __struct = Self::default();
9489        __struct.mcc = buf.get_u16_le();
9490        __struct.mnc = buf.get_u16_le();
9491        __struct.lac = buf.get_u16_le();
9492        let tmp = buf.get_u8();
9493        __struct.status =
9494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9495                enum_type: "CellularStatusFlag",
9496                value: tmp as u64,
9497            })?;
9498        let tmp = buf.get_u8();
9499        __struct.failure_reason =
9500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9501                enum_type: "CellularNetworkFailedReason",
9502                value: tmp as u64,
9503            })?;
9504        let tmp = buf.get_u8();
9505        __struct.mavtype =
9506            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9507                enum_type: "CellularNetworkRadioType",
9508                value: tmp as u64,
9509            })?;
9510        __struct.quality = buf.get_u8();
9511        Ok(__struct)
9512    }
9513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9514        let mut __tmp = BytesMut::new(bytes);
9515        #[allow(clippy::absurd_extreme_comparisons)]
9516        #[allow(unused_comparisons)]
9517        if __tmp.remaining() < Self::ENCODED_LEN {
9518            panic!(
9519                "buffer is too small (need {} bytes, but got {})",
9520                Self::ENCODED_LEN,
9521                __tmp.remaining(),
9522            )
9523        }
9524        __tmp.put_u16_le(self.mcc);
9525        __tmp.put_u16_le(self.mnc);
9526        __tmp.put_u16_le(self.lac);
9527        __tmp.put_u8(self.status as u8);
9528        __tmp.put_u8(self.failure_reason as u8);
9529        __tmp.put_u8(self.mavtype as u8);
9530        __tmp.put_u8(self.quality);
9531        if matches!(version, MavlinkVersion::V2) {
9532            let len = __tmp.len();
9533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9534        } else {
9535            __tmp.len()
9536        }
9537    }
9538}
9539#[doc = "Request to control this MAV."]
9540#[doc = ""]
9541#[doc = "ID: 5"]
9542#[derive(Debug, Clone, PartialEq)]
9543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9545#[cfg_attr(feature = "ts", derive(TS))]
9546#[cfg_attr(feature = "ts", ts(export))]
9547pub struct CHANGE_OPERATOR_CONTROL_DATA {
9548    #[doc = "System the GCS requests control for"]
9549    pub target_system: u8,
9550    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9551    pub control_request: u8,
9552    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9553    pub version: u8,
9554    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9555    #[cfg_attr(feature = "ts", ts(type = "string"))]
9556    pub passkey: CharArray<25>,
9557}
9558impl CHANGE_OPERATOR_CONTROL_DATA {
9559    pub const ENCODED_LEN: usize = 28usize;
9560    pub const DEFAULT: Self = Self {
9561        target_system: 0_u8,
9562        control_request: 0_u8,
9563        version: 0_u8,
9564        passkey: CharArray::new([0_u8; 25usize]),
9565    };
9566    #[cfg(feature = "arbitrary")]
9567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9568        use arbitrary::{Arbitrary, Unstructured};
9569        let mut buf = [0u8; 1024];
9570        rng.fill_bytes(&mut buf);
9571        let mut unstructured = Unstructured::new(&buf);
9572        Self::arbitrary(&mut unstructured).unwrap_or_default()
9573    }
9574}
9575impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9576    fn default() -> Self {
9577        Self::DEFAULT.clone()
9578    }
9579}
9580impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9581    type Message = MavMessage;
9582    const ID: u32 = 5u32;
9583    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9584    const EXTRA_CRC: u8 = 217u8;
9585    const ENCODED_LEN: usize = 28usize;
9586    fn deser(
9587        _version: MavlinkVersion,
9588        __input: &[u8],
9589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9590        let avail_len = __input.len();
9591        let mut payload_buf = [0; Self::ENCODED_LEN];
9592        let mut buf = if avail_len < Self::ENCODED_LEN {
9593            payload_buf[0..avail_len].copy_from_slice(__input);
9594            Bytes::new(&payload_buf)
9595        } else {
9596            Bytes::new(__input)
9597        };
9598        let mut __struct = Self::default();
9599        __struct.target_system = buf.get_u8();
9600        __struct.control_request = buf.get_u8();
9601        __struct.version = buf.get_u8();
9602        let mut tmp = [0_u8; 25usize];
9603        for v in &mut tmp {
9604            *v = buf.get_u8();
9605        }
9606        __struct.passkey = CharArray::new(tmp);
9607        Ok(__struct)
9608    }
9609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9610        let mut __tmp = BytesMut::new(bytes);
9611        #[allow(clippy::absurd_extreme_comparisons)]
9612        #[allow(unused_comparisons)]
9613        if __tmp.remaining() < Self::ENCODED_LEN {
9614            panic!(
9615                "buffer is too small (need {} bytes, but got {})",
9616                Self::ENCODED_LEN,
9617                __tmp.remaining(),
9618            )
9619        }
9620        __tmp.put_u8(self.target_system);
9621        __tmp.put_u8(self.control_request);
9622        __tmp.put_u8(self.version);
9623        for val in &self.passkey {
9624            __tmp.put_u8(*val);
9625        }
9626        if matches!(version, MavlinkVersion::V2) {
9627            let len = __tmp.len();
9628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9629        } else {
9630            __tmp.len()
9631        }
9632    }
9633}
9634#[doc = "Accept / deny control of this MAV."]
9635#[doc = ""]
9636#[doc = "ID: 6"]
9637#[derive(Debug, Clone, PartialEq)]
9638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9640#[cfg_attr(feature = "ts", derive(TS))]
9641#[cfg_attr(feature = "ts", ts(export))]
9642pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9643    #[doc = "ID of the GCS this message"]
9644    pub gcs_system_id: u8,
9645    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9646    pub control_request: u8,
9647    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9648    pub ack: u8,
9649}
9650impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9651    pub const ENCODED_LEN: usize = 3usize;
9652    pub const DEFAULT: Self = Self {
9653        gcs_system_id: 0_u8,
9654        control_request: 0_u8,
9655        ack: 0_u8,
9656    };
9657    #[cfg(feature = "arbitrary")]
9658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9659        use arbitrary::{Arbitrary, Unstructured};
9660        let mut buf = [0u8; 1024];
9661        rng.fill_bytes(&mut buf);
9662        let mut unstructured = Unstructured::new(&buf);
9663        Self::arbitrary(&mut unstructured).unwrap_or_default()
9664    }
9665}
9666impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9667    fn default() -> Self {
9668        Self::DEFAULT.clone()
9669    }
9670}
9671impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9672    type Message = MavMessage;
9673    const ID: u32 = 6u32;
9674    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9675    const EXTRA_CRC: u8 = 104u8;
9676    const ENCODED_LEN: usize = 3usize;
9677    fn deser(
9678        _version: MavlinkVersion,
9679        __input: &[u8],
9680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9681        let avail_len = __input.len();
9682        let mut payload_buf = [0; Self::ENCODED_LEN];
9683        let mut buf = if avail_len < Self::ENCODED_LEN {
9684            payload_buf[0..avail_len].copy_from_slice(__input);
9685            Bytes::new(&payload_buf)
9686        } else {
9687            Bytes::new(__input)
9688        };
9689        let mut __struct = Self::default();
9690        __struct.gcs_system_id = buf.get_u8();
9691        __struct.control_request = buf.get_u8();
9692        __struct.ack = buf.get_u8();
9693        Ok(__struct)
9694    }
9695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9696        let mut __tmp = BytesMut::new(bytes);
9697        #[allow(clippy::absurd_extreme_comparisons)]
9698        #[allow(unused_comparisons)]
9699        if __tmp.remaining() < Self::ENCODED_LEN {
9700            panic!(
9701                "buffer is too small (need {} bytes, but got {})",
9702                Self::ENCODED_LEN,
9703                __tmp.remaining(),
9704            )
9705        }
9706        __tmp.put_u8(self.gcs_system_id);
9707        __tmp.put_u8(self.control_request);
9708        __tmp.put_u8(self.ack);
9709        if matches!(version, MavlinkVersion::V2) {
9710            let len = __tmp.len();
9711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9712        } else {
9713            __tmp.len()
9714        }
9715    }
9716}
9717#[doc = "Information about a potential collision."]
9718#[doc = ""]
9719#[doc = "ID: 247"]
9720#[derive(Debug, Clone, PartialEq)]
9721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9723#[cfg_attr(feature = "ts", derive(TS))]
9724#[cfg_attr(feature = "ts", ts(export))]
9725pub struct COLLISION_DATA {
9726    #[doc = "Unique identifier, domain based on src field"]
9727    pub id: u32,
9728    #[doc = "Estimated time until collision occurs"]
9729    pub time_to_minimum_delta: f32,
9730    #[doc = "Closest vertical distance between vehicle and object"]
9731    pub altitude_minimum_delta: f32,
9732    #[doc = "Closest horizontal distance between vehicle and object"]
9733    pub horizontal_minimum_delta: f32,
9734    #[doc = "Collision data source"]
9735    pub src: MavCollisionSrc,
9736    #[doc = "Action that is being taken to avoid this collision"]
9737    pub action: MavCollisionAction,
9738    #[doc = "How concerned the aircraft is about this collision"]
9739    pub threat_level: MavCollisionThreatLevel,
9740}
9741impl COLLISION_DATA {
9742    pub const ENCODED_LEN: usize = 19usize;
9743    pub const DEFAULT: Self = Self {
9744        id: 0_u32,
9745        time_to_minimum_delta: 0.0_f32,
9746        altitude_minimum_delta: 0.0_f32,
9747        horizontal_minimum_delta: 0.0_f32,
9748        src: MavCollisionSrc::DEFAULT,
9749        action: MavCollisionAction::DEFAULT,
9750        threat_level: MavCollisionThreatLevel::DEFAULT,
9751    };
9752    #[cfg(feature = "arbitrary")]
9753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9754        use arbitrary::{Arbitrary, Unstructured};
9755        let mut buf = [0u8; 1024];
9756        rng.fill_bytes(&mut buf);
9757        let mut unstructured = Unstructured::new(&buf);
9758        Self::arbitrary(&mut unstructured).unwrap_or_default()
9759    }
9760}
9761impl Default for COLLISION_DATA {
9762    fn default() -> Self {
9763        Self::DEFAULT.clone()
9764    }
9765}
9766impl MessageData for COLLISION_DATA {
9767    type Message = MavMessage;
9768    const ID: u32 = 247u32;
9769    const NAME: &'static str = "COLLISION";
9770    const EXTRA_CRC: u8 = 81u8;
9771    const ENCODED_LEN: usize = 19usize;
9772    fn deser(
9773        _version: MavlinkVersion,
9774        __input: &[u8],
9775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9776        let avail_len = __input.len();
9777        let mut payload_buf = [0; Self::ENCODED_LEN];
9778        let mut buf = if avail_len < Self::ENCODED_LEN {
9779            payload_buf[0..avail_len].copy_from_slice(__input);
9780            Bytes::new(&payload_buf)
9781        } else {
9782            Bytes::new(__input)
9783        };
9784        let mut __struct = Self::default();
9785        __struct.id = buf.get_u32_le();
9786        __struct.time_to_minimum_delta = buf.get_f32_le();
9787        __struct.altitude_minimum_delta = buf.get_f32_le();
9788        __struct.horizontal_minimum_delta = buf.get_f32_le();
9789        let tmp = buf.get_u8();
9790        __struct.src =
9791            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9792                enum_type: "MavCollisionSrc",
9793                value: tmp as u64,
9794            })?;
9795        let tmp = buf.get_u8();
9796        __struct.action =
9797            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9798                enum_type: "MavCollisionAction",
9799                value: tmp as u64,
9800            })?;
9801        let tmp = buf.get_u8();
9802        __struct.threat_level =
9803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9804                enum_type: "MavCollisionThreatLevel",
9805                value: tmp as u64,
9806            })?;
9807        Ok(__struct)
9808    }
9809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9810        let mut __tmp = BytesMut::new(bytes);
9811        #[allow(clippy::absurd_extreme_comparisons)]
9812        #[allow(unused_comparisons)]
9813        if __tmp.remaining() < Self::ENCODED_LEN {
9814            panic!(
9815                "buffer is too small (need {} bytes, but got {})",
9816                Self::ENCODED_LEN,
9817                __tmp.remaining(),
9818            )
9819        }
9820        __tmp.put_u32_le(self.id);
9821        __tmp.put_f32_le(self.time_to_minimum_delta);
9822        __tmp.put_f32_le(self.altitude_minimum_delta);
9823        __tmp.put_f32_le(self.horizontal_minimum_delta);
9824        __tmp.put_u8(self.src as u8);
9825        __tmp.put_u8(self.action as u8);
9826        __tmp.put_u8(self.threat_level as u8);
9827        if matches!(version, MavlinkVersion::V2) {
9828            let len = __tmp.len();
9829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9830        } else {
9831            __tmp.len()
9832        }
9833    }
9834}
9835#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9836#[doc = ""]
9837#[doc = "ID: 77"]
9838#[derive(Debug, Clone, PartialEq)]
9839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9841#[cfg_attr(feature = "ts", derive(TS))]
9842#[cfg_attr(feature = "ts", ts(export))]
9843pub struct COMMAND_ACK_DATA {
9844    #[doc = "Command ID (of acknowledged command)."]
9845    pub command: MavCmd,
9846    #[doc = "Result of command."]
9847    pub result: MavResult,
9848    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9849    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9850    pub progress: u8,
9851    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9853    pub result_param2: i32,
9854    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9856    pub target_system: u8,
9857    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9859    pub target_component: u8,
9860}
9861impl COMMAND_ACK_DATA {
9862    pub const ENCODED_LEN: usize = 10usize;
9863    pub const DEFAULT: Self = Self {
9864        command: MavCmd::DEFAULT,
9865        result: MavResult::DEFAULT,
9866        progress: 0_u8,
9867        result_param2: 0_i32,
9868        target_system: 0_u8,
9869        target_component: 0_u8,
9870    };
9871    #[cfg(feature = "arbitrary")]
9872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9873        use arbitrary::{Arbitrary, Unstructured};
9874        let mut buf = [0u8; 1024];
9875        rng.fill_bytes(&mut buf);
9876        let mut unstructured = Unstructured::new(&buf);
9877        Self::arbitrary(&mut unstructured).unwrap_or_default()
9878    }
9879}
9880impl Default for COMMAND_ACK_DATA {
9881    fn default() -> Self {
9882        Self::DEFAULT.clone()
9883    }
9884}
9885impl MessageData for COMMAND_ACK_DATA {
9886    type Message = MavMessage;
9887    const ID: u32 = 77u32;
9888    const NAME: &'static str = "COMMAND_ACK";
9889    const EXTRA_CRC: u8 = 143u8;
9890    const ENCODED_LEN: usize = 10usize;
9891    fn deser(
9892        _version: MavlinkVersion,
9893        __input: &[u8],
9894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9895        let avail_len = __input.len();
9896        let mut payload_buf = [0; Self::ENCODED_LEN];
9897        let mut buf = if avail_len < Self::ENCODED_LEN {
9898            payload_buf[0..avail_len].copy_from_slice(__input);
9899            Bytes::new(&payload_buf)
9900        } else {
9901            Bytes::new(__input)
9902        };
9903        let mut __struct = Self::default();
9904        let tmp = buf.get_u16_le();
9905        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9906            ::mavlink_core::error::ParserError::InvalidEnum {
9907                enum_type: "MavCmd",
9908                value: tmp as u64,
9909            },
9910        )?;
9911        let tmp = buf.get_u8();
9912        __struct.result =
9913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9914                enum_type: "MavResult",
9915                value: tmp as u64,
9916            })?;
9917        __struct.progress = buf.get_u8();
9918        __struct.result_param2 = buf.get_i32_le();
9919        __struct.target_system = buf.get_u8();
9920        __struct.target_component = buf.get_u8();
9921        Ok(__struct)
9922    }
9923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9924        let mut __tmp = BytesMut::new(bytes);
9925        #[allow(clippy::absurd_extreme_comparisons)]
9926        #[allow(unused_comparisons)]
9927        if __tmp.remaining() < Self::ENCODED_LEN {
9928            panic!(
9929                "buffer is too small (need {} bytes, but got {})",
9930                Self::ENCODED_LEN,
9931                __tmp.remaining(),
9932            )
9933        }
9934        __tmp.put_u16_le(self.command as u16);
9935        __tmp.put_u8(self.result as u8);
9936        if matches!(version, MavlinkVersion::V2) {
9937            __tmp.put_u8(self.progress);
9938            __tmp.put_i32_le(self.result_param2);
9939            __tmp.put_u8(self.target_system);
9940            __tmp.put_u8(self.target_component);
9941            let len = __tmp.len();
9942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9943        } else {
9944            __tmp.len()
9945        }
9946    }
9947}
9948#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9949#[doc = ""]
9950#[doc = "ID: 80"]
9951#[derive(Debug, Clone, PartialEq)]
9952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9954#[cfg_attr(feature = "ts", derive(TS))]
9955#[cfg_attr(feature = "ts", ts(export))]
9956pub struct COMMAND_CANCEL_DATA {
9957    #[doc = "Command ID (of command to cancel)."]
9958    pub command: MavCmd,
9959    #[doc = "System executing long running command. Should not be broadcast (0)."]
9960    pub target_system: u8,
9961    #[doc = "Component executing long running command."]
9962    pub target_component: u8,
9963}
9964impl COMMAND_CANCEL_DATA {
9965    pub const ENCODED_LEN: usize = 4usize;
9966    pub const DEFAULT: Self = Self {
9967        command: MavCmd::DEFAULT,
9968        target_system: 0_u8,
9969        target_component: 0_u8,
9970    };
9971    #[cfg(feature = "arbitrary")]
9972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9973        use arbitrary::{Arbitrary, Unstructured};
9974        let mut buf = [0u8; 1024];
9975        rng.fill_bytes(&mut buf);
9976        let mut unstructured = Unstructured::new(&buf);
9977        Self::arbitrary(&mut unstructured).unwrap_or_default()
9978    }
9979}
9980impl Default for COMMAND_CANCEL_DATA {
9981    fn default() -> Self {
9982        Self::DEFAULT.clone()
9983    }
9984}
9985impl MessageData for COMMAND_CANCEL_DATA {
9986    type Message = MavMessage;
9987    const ID: u32 = 80u32;
9988    const NAME: &'static str = "COMMAND_CANCEL";
9989    const EXTRA_CRC: u8 = 14u8;
9990    const ENCODED_LEN: usize = 4usize;
9991    fn deser(
9992        _version: MavlinkVersion,
9993        __input: &[u8],
9994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9995        let avail_len = __input.len();
9996        let mut payload_buf = [0; Self::ENCODED_LEN];
9997        let mut buf = if avail_len < Self::ENCODED_LEN {
9998            payload_buf[0..avail_len].copy_from_slice(__input);
9999            Bytes::new(&payload_buf)
10000        } else {
10001            Bytes::new(__input)
10002        };
10003        let mut __struct = Self::default();
10004        let tmp = buf.get_u16_le();
10005        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10006            ::mavlink_core::error::ParserError::InvalidEnum {
10007                enum_type: "MavCmd",
10008                value: tmp as u64,
10009            },
10010        )?;
10011        __struct.target_system = buf.get_u8();
10012        __struct.target_component = buf.get_u8();
10013        Ok(__struct)
10014    }
10015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10016        let mut __tmp = BytesMut::new(bytes);
10017        #[allow(clippy::absurd_extreme_comparisons)]
10018        #[allow(unused_comparisons)]
10019        if __tmp.remaining() < Self::ENCODED_LEN {
10020            panic!(
10021                "buffer is too small (need {} bytes, but got {})",
10022                Self::ENCODED_LEN,
10023                __tmp.remaining(),
10024            )
10025        }
10026        __tmp.put_u16_le(self.command as u16);
10027        __tmp.put_u8(self.target_system);
10028        __tmp.put_u8(self.target_component);
10029        if matches!(version, MavlinkVersion::V2) {
10030            let len = __tmp.len();
10031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10032        } else {
10033            __tmp.len()
10034        }
10035    }
10036}
10037#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10038#[doc = ""]
10039#[doc = "ID: 75"]
10040#[derive(Debug, Clone, PartialEq)]
10041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10043#[cfg_attr(feature = "ts", derive(TS))]
10044#[cfg_attr(feature = "ts", ts(export))]
10045pub struct COMMAND_INT_DATA {
10046    #[doc = "PARAM1, see MAV_CMD enum"]
10047    pub param1: f32,
10048    #[doc = "PARAM2, see MAV_CMD enum"]
10049    pub param2: f32,
10050    #[doc = "PARAM3, see MAV_CMD enum"]
10051    pub param3: f32,
10052    #[doc = "PARAM4, see MAV_CMD enum"]
10053    pub param4: f32,
10054    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
10055    pub x: i32,
10056    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
10057    pub y: i32,
10058    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
10059    pub z: f32,
10060    #[doc = "The scheduled action for the mission item."]
10061    pub command: MavCmd,
10062    #[doc = "System ID"]
10063    pub target_system: u8,
10064    #[doc = "Component ID"]
10065    pub target_component: u8,
10066    #[doc = "The coordinate system of the COMMAND."]
10067    pub frame: MavFrame,
10068    #[doc = "Not used."]
10069    pub current: u8,
10070    #[doc = "Not used (set 0)."]
10071    pub autocontinue: u8,
10072}
10073impl COMMAND_INT_DATA {
10074    pub const ENCODED_LEN: usize = 35usize;
10075    pub const DEFAULT: Self = Self {
10076        param1: 0.0_f32,
10077        param2: 0.0_f32,
10078        param3: 0.0_f32,
10079        param4: 0.0_f32,
10080        x: 0_i32,
10081        y: 0_i32,
10082        z: 0.0_f32,
10083        command: MavCmd::DEFAULT,
10084        target_system: 0_u8,
10085        target_component: 0_u8,
10086        frame: MavFrame::DEFAULT,
10087        current: 0_u8,
10088        autocontinue: 0_u8,
10089    };
10090    #[cfg(feature = "arbitrary")]
10091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10092        use arbitrary::{Arbitrary, Unstructured};
10093        let mut buf = [0u8; 1024];
10094        rng.fill_bytes(&mut buf);
10095        let mut unstructured = Unstructured::new(&buf);
10096        Self::arbitrary(&mut unstructured).unwrap_or_default()
10097    }
10098}
10099impl Default for COMMAND_INT_DATA {
10100    fn default() -> Self {
10101        Self::DEFAULT.clone()
10102    }
10103}
10104impl MessageData for COMMAND_INT_DATA {
10105    type Message = MavMessage;
10106    const ID: u32 = 75u32;
10107    const NAME: &'static str = "COMMAND_INT";
10108    const EXTRA_CRC: u8 = 158u8;
10109    const ENCODED_LEN: usize = 35usize;
10110    fn deser(
10111        _version: MavlinkVersion,
10112        __input: &[u8],
10113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10114        let avail_len = __input.len();
10115        let mut payload_buf = [0; Self::ENCODED_LEN];
10116        let mut buf = if avail_len < Self::ENCODED_LEN {
10117            payload_buf[0..avail_len].copy_from_slice(__input);
10118            Bytes::new(&payload_buf)
10119        } else {
10120            Bytes::new(__input)
10121        };
10122        let mut __struct = Self::default();
10123        __struct.param1 = buf.get_f32_le();
10124        __struct.param2 = buf.get_f32_le();
10125        __struct.param3 = buf.get_f32_le();
10126        __struct.param4 = buf.get_f32_le();
10127        __struct.x = buf.get_i32_le();
10128        __struct.y = buf.get_i32_le();
10129        __struct.z = buf.get_f32_le();
10130        let tmp = buf.get_u16_le();
10131        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10132            ::mavlink_core::error::ParserError::InvalidEnum {
10133                enum_type: "MavCmd",
10134                value: tmp as u64,
10135            },
10136        )?;
10137        __struct.target_system = buf.get_u8();
10138        __struct.target_component = buf.get_u8();
10139        let tmp = buf.get_u8();
10140        __struct.frame =
10141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10142                enum_type: "MavFrame",
10143                value: tmp as u64,
10144            })?;
10145        __struct.current = buf.get_u8();
10146        __struct.autocontinue = buf.get_u8();
10147        Ok(__struct)
10148    }
10149    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10150        let mut __tmp = BytesMut::new(bytes);
10151        #[allow(clippy::absurd_extreme_comparisons)]
10152        #[allow(unused_comparisons)]
10153        if __tmp.remaining() < Self::ENCODED_LEN {
10154            panic!(
10155                "buffer is too small (need {} bytes, but got {})",
10156                Self::ENCODED_LEN,
10157                __tmp.remaining(),
10158            )
10159        }
10160        __tmp.put_f32_le(self.param1);
10161        __tmp.put_f32_le(self.param2);
10162        __tmp.put_f32_le(self.param3);
10163        __tmp.put_f32_le(self.param4);
10164        __tmp.put_i32_le(self.x);
10165        __tmp.put_i32_le(self.y);
10166        __tmp.put_f32_le(self.z);
10167        __tmp.put_u16_le(self.command as u16);
10168        __tmp.put_u8(self.target_system);
10169        __tmp.put_u8(self.target_component);
10170        __tmp.put_u8(self.frame as u8);
10171        __tmp.put_u8(self.current);
10172        __tmp.put_u8(self.autocontinue);
10173        if matches!(version, MavlinkVersion::V2) {
10174            let len = __tmp.len();
10175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10176        } else {
10177            __tmp.len()
10178        }
10179    }
10180}
10181#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
10182#[doc = ""]
10183#[doc = "ID: 76"]
10184#[derive(Debug, Clone, PartialEq)]
10185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10187#[cfg_attr(feature = "ts", derive(TS))]
10188#[cfg_attr(feature = "ts", ts(export))]
10189pub struct COMMAND_LONG_DATA {
10190    #[doc = "Parameter 1 (for the specific command)."]
10191    pub param1: f32,
10192    #[doc = "Parameter 2 (for the specific command)."]
10193    pub param2: f32,
10194    #[doc = "Parameter 3 (for the specific command)."]
10195    pub param3: f32,
10196    #[doc = "Parameter 4 (for the specific command)."]
10197    pub param4: f32,
10198    #[doc = "Parameter 5 (for the specific command)."]
10199    pub param5: f32,
10200    #[doc = "Parameter 6 (for the specific command)."]
10201    pub param6: f32,
10202    #[doc = "Parameter 7 (for the specific command)."]
10203    pub param7: f32,
10204    #[doc = "Command ID (of command to send)."]
10205    pub command: MavCmd,
10206    #[doc = "System which should execute the command"]
10207    pub target_system: u8,
10208    #[doc = "Component which should execute the command, 0 for all components"]
10209    pub target_component: u8,
10210    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
10211    pub confirmation: u8,
10212}
10213impl COMMAND_LONG_DATA {
10214    pub const ENCODED_LEN: usize = 33usize;
10215    pub const DEFAULT: Self = Self {
10216        param1: 0.0_f32,
10217        param2: 0.0_f32,
10218        param3: 0.0_f32,
10219        param4: 0.0_f32,
10220        param5: 0.0_f32,
10221        param6: 0.0_f32,
10222        param7: 0.0_f32,
10223        command: MavCmd::DEFAULT,
10224        target_system: 0_u8,
10225        target_component: 0_u8,
10226        confirmation: 0_u8,
10227    };
10228    #[cfg(feature = "arbitrary")]
10229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10230        use arbitrary::{Arbitrary, Unstructured};
10231        let mut buf = [0u8; 1024];
10232        rng.fill_bytes(&mut buf);
10233        let mut unstructured = Unstructured::new(&buf);
10234        Self::arbitrary(&mut unstructured).unwrap_or_default()
10235    }
10236}
10237impl Default for COMMAND_LONG_DATA {
10238    fn default() -> Self {
10239        Self::DEFAULT.clone()
10240    }
10241}
10242impl MessageData for COMMAND_LONG_DATA {
10243    type Message = MavMessage;
10244    const ID: u32 = 76u32;
10245    const NAME: &'static str = "COMMAND_LONG";
10246    const EXTRA_CRC: u8 = 152u8;
10247    const ENCODED_LEN: usize = 33usize;
10248    fn deser(
10249        _version: MavlinkVersion,
10250        __input: &[u8],
10251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10252        let avail_len = __input.len();
10253        let mut payload_buf = [0; Self::ENCODED_LEN];
10254        let mut buf = if avail_len < Self::ENCODED_LEN {
10255            payload_buf[0..avail_len].copy_from_slice(__input);
10256            Bytes::new(&payload_buf)
10257        } else {
10258            Bytes::new(__input)
10259        };
10260        let mut __struct = Self::default();
10261        __struct.param1 = buf.get_f32_le();
10262        __struct.param2 = buf.get_f32_le();
10263        __struct.param3 = buf.get_f32_le();
10264        __struct.param4 = buf.get_f32_le();
10265        __struct.param5 = buf.get_f32_le();
10266        __struct.param6 = buf.get_f32_le();
10267        __struct.param7 = buf.get_f32_le();
10268        let tmp = buf.get_u16_le();
10269        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10270            ::mavlink_core::error::ParserError::InvalidEnum {
10271                enum_type: "MavCmd",
10272                value: tmp as u64,
10273            },
10274        )?;
10275        __struct.target_system = buf.get_u8();
10276        __struct.target_component = buf.get_u8();
10277        __struct.confirmation = buf.get_u8();
10278        Ok(__struct)
10279    }
10280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10281        let mut __tmp = BytesMut::new(bytes);
10282        #[allow(clippy::absurd_extreme_comparisons)]
10283        #[allow(unused_comparisons)]
10284        if __tmp.remaining() < Self::ENCODED_LEN {
10285            panic!(
10286                "buffer is too small (need {} bytes, but got {})",
10287                Self::ENCODED_LEN,
10288                __tmp.remaining(),
10289            )
10290        }
10291        __tmp.put_f32_le(self.param1);
10292        __tmp.put_f32_le(self.param2);
10293        __tmp.put_f32_le(self.param3);
10294        __tmp.put_f32_le(self.param4);
10295        __tmp.put_f32_le(self.param5);
10296        __tmp.put_f32_le(self.param6);
10297        __tmp.put_f32_le(self.param7);
10298        __tmp.put_u16_le(self.command as u16);
10299        __tmp.put_u8(self.target_system);
10300        __tmp.put_u8(self.target_component);
10301        __tmp.put_u8(self.confirmation);
10302        if matches!(version, MavlinkVersion::V2) {
10303            let len = __tmp.len();
10304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10305        } else {
10306            __tmp.len()
10307        }
10308    }
10309}
10310#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
10311#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
10312#[doc = ""]
10313#[doc = "ID: 395"]
10314#[derive(Debug, Clone, PartialEq)]
10315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10317#[cfg_attr(feature = "ts", derive(TS))]
10318#[cfg_attr(feature = "ts", ts(export))]
10319pub struct COMPONENT_INFORMATION_DATA {
10320    #[doc = "Timestamp (time since system boot)."]
10321    pub time_boot_ms: u32,
10322    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
10323    pub general_metadata_file_crc: u32,
10324    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
10325    pub peripherals_metadata_file_crc: u32,
10326    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10327    #[cfg_attr(feature = "ts", ts(type = "string"))]
10328    pub general_metadata_uri: CharArray<100>,
10329    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
10330    #[cfg_attr(feature = "ts", ts(type = "string"))]
10331    pub peripherals_metadata_uri: CharArray<100>,
10332}
10333impl COMPONENT_INFORMATION_DATA {
10334    pub const ENCODED_LEN: usize = 212usize;
10335    pub const DEFAULT: Self = Self {
10336        time_boot_ms: 0_u32,
10337        general_metadata_file_crc: 0_u32,
10338        peripherals_metadata_file_crc: 0_u32,
10339        general_metadata_uri: CharArray::new([0_u8; 100usize]),
10340        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
10341    };
10342    #[cfg(feature = "arbitrary")]
10343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10344        use arbitrary::{Arbitrary, Unstructured};
10345        let mut buf = [0u8; 1024];
10346        rng.fill_bytes(&mut buf);
10347        let mut unstructured = Unstructured::new(&buf);
10348        Self::arbitrary(&mut unstructured).unwrap_or_default()
10349    }
10350}
10351impl Default for COMPONENT_INFORMATION_DATA {
10352    fn default() -> Self {
10353        Self::DEFAULT.clone()
10354    }
10355}
10356impl MessageData for COMPONENT_INFORMATION_DATA {
10357    type Message = MavMessage;
10358    const ID: u32 = 395u32;
10359    const NAME: &'static str = "COMPONENT_INFORMATION";
10360    const EXTRA_CRC: u8 = 0u8;
10361    const ENCODED_LEN: usize = 212usize;
10362    fn deser(
10363        _version: MavlinkVersion,
10364        __input: &[u8],
10365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10366        let avail_len = __input.len();
10367        let mut payload_buf = [0; Self::ENCODED_LEN];
10368        let mut buf = if avail_len < Self::ENCODED_LEN {
10369            payload_buf[0..avail_len].copy_from_slice(__input);
10370            Bytes::new(&payload_buf)
10371        } else {
10372            Bytes::new(__input)
10373        };
10374        let mut __struct = Self::default();
10375        __struct.time_boot_ms = buf.get_u32_le();
10376        __struct.general_metadata_file_crc = buf.get_u32_le();
10377        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
10378        let mut tmp = [0_u8; 100usize];
10379        for v in &mut tmp {
10380            *v = buf.get_u8();
10381        }
10382        __struct.general_metadata_uri = CharArray::new(tmp);
10383        let mut tmp = [0_u8; 100usize];
10384        for v in &mut tmp {
10385            *v = buf.get_u8();
10386        }
10387        __struct.peripherals_metadata_uri = CharArray::new(tmp);
10388        Ok(__struct)
10389    }
10390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10391        let mut __tmp = BytesMut::new(bytes);
10392        #[allow(clippy::absurd_extreme_comparisons)]
10393        #[allow(unused_comparisons)]
10394        if __tmp.remaining() < Self::ENCODED_LEN {
10395            panic!(
10396                "buffer is too small (need {} bytes, but got {})",
10397                Self::ENCODED_LEN,
10398                __tmp.remaining(),
10399            )
10400        }
10401        __tmp.put_u32_le(self.time_boot_ms);
10402        __tmp.put_u32_le(self.general_metadata_file_crc);
10403        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
10404        for val in &self.general_metadata_uri {
10405            __tmp.put_u8(*val);
10406        }
10407        for val in &self.peripherals_metadata_uri {
10408            __tmp.put_u8(*val);
10409        }
10410        if matches!(version, MavlinkVersion::V2) {
10411            let len = __tmp.len();
10412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10413        } else {
10414            __tmp.len()
10415        }
10416    }
10417}
10418#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10419#[doc = ""]
10420#[doc = "ID: 396"]
10421#[derive(Debug, Clone, PartialEq)]
10422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10424#[cfg_attr(feature = "ts", derive(TS))]
10425#[cfg_attr(feature = "ts", ts(export))]
10426pub struct COMPONENT_INFORMATION_BASIC_DATA {
10427    #[doc = "Component capability flags"]
10428    pub capabilities: MavProtocolCapability,
10429    #[doc = "Timestamp (time since system boot)."]
10430    pub time_boot_ms: u32,
10431    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10432    pub time_manufacture_s: u32,
10433    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10434    #[cfg_attr(feature = "ts", ts(type = "string"))]
10435    pub vendor_name: CharArray<32>,
10436    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10437    #[cfg_attr(feature = "ts", ts(type = "string"))]
10438    pub model_name: CharArray<32>,
10439    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10440    #[cfg_attr(feature = "ts", ts(type = "string"))]
10441    pub software_version: CharArray<24>,
10442    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10443    #[cfg_attr(feature = "ts", ts(type = "string"))]
10444    pub hardware_version: CharArray<24>,
10445    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10446    #[cfg_attr(feature = "ts", ts(type = "string"))]
10447    pub serial_number: CharArray<32>,
10448}
10449impl COMPONENT_INFORMATION_BASIC_DATA {
10450    pub const ENCODED_LEN: usize = 160usize;
10451    pub const DEFAULT: Self = Self {
10452        capabilities: MavProtocolCapability::DEFAULT,
10453        time_boot_ms: 0_u32,
10454        time_manufacture_s: 0_u32,
10455        vendor_name: CharArray::new([0_u8; 32usize]),
10456        model_name: CharArray::new([0_u8; 32usize]),
10457        software_version: CharArray::new([0_u8; 24usize]),
10458        hardware_version: CharArray::new([0_u8; 24usize]),
10459        serial_number: CharArray::new([0_u8; 32usize]),
10460    };
10461    #[cfg(feature = "arbitrary")]
10462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10463        use arbitrary::{Arbitrary, Unstructured};
10464        let mut buf = [0u8; 1024];
10465        rng.fill_bytes(&mut buf);
10466        let mut unstructured = Unstructured::new(&buf);
10467        Self::arbitrary(&mut unstructured).unwrap_or_default()
10468    }
10469}
10470impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10471    fn default() -> Self {
10472        Self::DEFAULT.clone()
10473    }
10474}
10475impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10476    type Message = MavMessage;
10477    const ID: u32 = 396u32;
10478    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10479    const EXTRA_CRC: u8 = 50u8;
10480    const ENCODED_LEN: usize = 160usize;
10481    fn deser(
10482        _version: MavlinkVersion,
10483        __input: &[u8],
10484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10485        let avail_len = __input.len();
10486        let mut payload_buf = [0; Self::ENCODED_LEN];
10487        let mut buf = if avail_len < Self::ENCODED_LEN {
10488            payload_buf[0..avail_len].copy_from_slice(__input);
10489            Bytes::new(&payload_buf)
10490        } else {
10491            Bytes::new(__input)
10492        };
10493        let mut __struct = Self::default();
10494        let tmp = buf.get_u64_le();
10495        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
10496            ::mavlink_core::error::ParserError::InvalidFlag {
10497                flag_type: "MavProtocolCapability",
10498                value: tmp as u64,
10499            },
10500        )?;
10501        __struct.time_boot_ms = buf.get_u32_le();
10502        __struct.time_manufacture_s = buf.get_u32_le();
10503        let mut tmp = [0_u8; 32usize];
10504        for v in &mut tmp {
10505            *v = buf.get_u8();
10506        }
10507        __struct.vendor_name = CharArray::new(tmp);
10508        let mut tmp = [0_u8; 32usize];
10509        for v in &mut tmp {
10510            *v = buf.get_u8();
10511        }
10512        __struct.model_name = CharArray::new(tmp);
10513        let mut tmp = [0_u8; 24usize];
10514        for v in &mut tmp {
10515            *v = buf.get_u8();
10516        }
10517        __struct.software_version = CharArray::new(tmp);
10518        let mut tmp = [0_u8; 24usize];
10519        for v in &mut tmp {
10520            *v = buf.get_u8();
10521        }
10522        __struct.hardware_version = CharArray::new(tmp);
10523        let mut tmp = [0_u8; 32usize];
10524        for v in &mut tmp {
10525            *v = buf.get_u8();
10526        }
10527        __struct.serial_number = CharArray::new(tmp);
10528        Ok(__struct)
10529    }
10530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10531        let mut __tmp = BytesMut::new(bytes);
10532        #[allow(clippy::absurd_extreme_comparisons)]
10533        #[allow(unused_comparisons)]
10534        if __tmp.remaining() < Self::ENCODED_LEN {
10535            panic!(
10536                "buffer is too small (need {} bytes, but got {})",
10537                Self::ENCODED_LEN,
10538                __tmp.remaining(),
10539            )
10540        }
10541        __tmp.put_u64_le(self.capabilities.bits());
10542        __tmp.put_u32_le(self.time_boot_ms);
10543        __tmp.put_u32_le(self.time_manufacture_s);
10544        for val in &self.vendor_name {
10545            __tmp.put_u8(*val);
10546        }
10547        for val in &self.model_name {
10548            __tmp.put_u8(*val);
10549        }
10550        for val in &self.software_version {
10551            __tmp.put_u8(*val);
10552        }
10553        for val in &self.hardware_version {
10554            __tmp.put_u8(*val);
10555        }
10556        for val in &self.serial_number {
10557            __tmp.put_u8(*val);
10558        }
10559        if matches!(version, MavlinkVersion::V2) {
10560            let len = __tmp.len();
10561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10562        } else {
10563            __tmp.len()
10564        }
10565    }
10566}
10567#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10568#[doc = ""]
10569#[doc = "ID: 397"]
10570#[derive(Debug, Clone, PartialEq)]
10571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10573#[cfg_attr(feature = "ts", derive(TS))]
10574#[cfg_attr(feature = "ts", ts(export))]
10575pub struct COMPONENT_METADATA_DATA {
10576    #[doc = "Timestamp (time since system boot)."]
10577    pub time_boot_ms: u32,
10578    #[doc = "CRC32 of the general metadata file."]
10579    pub file_crc: u32,
10580    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10581    #[cfg_attr(feature = "ts", ts(type = "string"))]
10582    pub uri: CharArray<100>,
10583}
10584impl COMPONENT_METADATA_DATA {
10585    pub const ENCODED_LEN: usize = 108usize;
10586    pub const DEFAULT: Self = Self {
10587        time_boot_ms: 0_u32,
10588        file_crc: 0_u32,
10589        uri: CharArray::new([0_u8; 100usize]),
10590    };
10591    #[cfg(feature = "arbitrary")]
10592    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10593        use arbitrary::{Arbitrary, Unstructured};
10594        let mut buf = [0u8; 1024];
10595        rng.fill_bytes(&mut buf);
10596        let mut unstructured = Unstructured::new(&buf);
10597        Self::arbitrary(&mut unstructured).unwrap_or_default()
10598    }
10599}
10600impl Default for COMPONENT_METADATA_DATA {
10601    fn default() -> Self {
10602        Self::DEFAULT.clone()
10603    }
10604}
10605impl MessageData for COMPONENT_METADATA_DATA {
10606    type Message = MavMessage;
10607    const ID: u32 = 397u32;
10608    const NAME: &'static str = "COMPONENT_METADATA";
10609    const EXTRA_CRC: u8 = 182u8;
10610    const ENCODED_LEN: usize = 108usize;
10611    fn deser(
10612        _version: MavlinkVersion,
10613        __input: &[u8],
10614    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10615        let avail_len = __input.len();
10616        let mut payload_buf = [0; Self::ENCODED_LEN];
10617        let mut buf = if avail_len < Self::ENCODED_LEN {
10618            payload_buf[0..avail_len].copy_from_slice(__input);
10619            Bytes::new(&payload_buf)
10620        } else {
10621            Bytes::new(__input)
10622        };
10623        let mut __struct = Self::default();
10624        __struct.time_boot_ms = buf.get_u32_le();
10625        __struct.file_crc = buf.get_u32_le();
10626        let mut tmp = [0_u8; 100usize];
10627        for v in &mut tmp {
10628            *v = buf.get_u8();
10629        }
10630        __struct.uri = CharArray::new(tmp);
10631        Ok(__struct)
10632    }
10633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10634        let mut __tmp = BytesMut::new(bytes);
10635        #[allow(clippy::absurd_extreme_comparisons)]
10636        #[allow(unused_comparisons)]
10637        if __tmp.remaining() < Self::ENCODED_LEN {
10638            panic!(
10639                "buffer is too small (need {} bytes, but got {})",
10640                Self::ENCODED_LEN,
10641                __tmp.remaining(),
10642            )
10643        }
10644        __tmp.put_u32_le(self.time_boot_ms);
10645        __tmp.put_u32_le(self.file_crc);
10646        for val in &self.uri {
10647            __tmp.put_u8(*val);
10648        }
10649        if matches!(version, MavlinkVersion::V2) {
10650            let len = __tmp.len();
10651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10652        } else {
10653            __tmp.len()
10654        }
10655    }
10656}
10657#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10658#[doc = ""]
10659#[doc = "ID: 146"]
10660#[derive(Debug, Clone, PartialEq)]
10661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10663#[cfg_attr(feature = "ts", derive(TS))]
10664#[cfg_attr(feature = "ts", ts(export))]
10665pub struct CONTROL_SYSTEM_STATE_DATA {
10666    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10667    pub time_usec: u64,
10668    #[doc = "X acceleration in body frame"]
10669    pub x_acc: f32,
10670    #[doc = "Y acceleration in body frame"]
10671    pub y_acc: f32,
10672    #[doc = "Z acceleration in body frame"]
10673    pub z_acc: f32,
10674    #[doc = "X velocity in body frame"]
10675    pub x_vel: f32,
10676    #[doc = "Y velocity in body frame"]
10677    pub y_vel: f32,
10678    #[doc = "Z velocity in body frame"]
10679    pub z_vel: f32,
10680    #[doc = "X position in local frame"]
10681    pub x_pos: f32,
10682    #[doc = "Y position in local frame"]
10683    pub y_pos: f32,
10684    #[doc = "Z position in local frame"]
10685    pub z_pos: f32,
10686    #[doc = "Airspeed, set to -1 if unknown"]
10687    pub airspeed: f32,
10688    #[doc = "Variance of body velocity estimate"]
10689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10690    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10691    pub vel_variance: [f32; 3],
10692    #[doc = "Variance in local position"]
10693    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10694    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10695    pub pos_variance: [f32; 3],
10696    #[doc = "The attitude, represented as Quaternion"]
10697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10698    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10699    pub q: [f32; 4],
10700    #[doc = "Angular rate in roll axis"]
10701    pub roll_rate: f32,
10702    #[doc = "Angular rate in pitch axis"]
10703    pub pitch_rate: f32,
10704    #[doc = "Angular rate in yaw axis"]
10705    pub yaw_rate: f32,
10706}
10707impl CONTROL_SYSTEM_STATE_DATA {
10708    pub const ENCODED_LEN: usize = 100usize;
10709    pub const DEFAULT: Self = Self {
10710        time_usec: 0_u64,
10711        x_acc: 0.0_f32,
10712        y_acc: 0.0_f32,
10713        z_acc: 0.0_f32,
10714        x_vel: 0.0_f32,
10715        y_vel: 0.0_f32,
10716        z_vel: 0.0_f32,
10717        x_pos: 0.0_f32,
10718        y_pos: 0.0_f32,
10719        z_pos: 0.0_f32,
10720        airspeed: 0.0_f32,
10721        vel_variance: [0.0_f32; 3usize],
10722        pos_variance: [0.0_f32; 3usize],
10723        q: [0.0_f32; 4usize],
10724        roll_rate: 0.0_f32,
10725        pitch_rate: 0.0_f32,
10726        yaw_rate: 0.0_f32,
10727    };
10728    #[cfg(feature = "arbitrary")]
10729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10730        use arbitrary::{Arbitrary, Unstructured};
10731        let mut buf = [0u8; 1024];
10732        rng.fill_bytes(&mut buf);
10733        let mut unstructured = Unstructured::new(&buf);
10734        Self::arbitrary(&mut unstructured).unwrap_or_default()
10735    }
10736}
10737impl Default for CONTROL_SYSTEM_STATE_DATA {
10738    fn default() -> Self {
10739        Self::DEFAULT.clone()
10740    }
10741}
10742impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10743    type Message = MavMessage;
10744    const ID: u32 = 146u32;
10745    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10746    const EXTRA_CRC: u8 = 103u8;
10747    const ENCODED_LEN: usize = 100usize;
10748    fn deser(
10749        _version: MavlinkVersion,
10750        __input: &[u8],
10751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10752        let avail_len = __input.len();
10753        let mut payload_buf = [0; Self::ENCODED_LEN];
10754        let mut buf = if avail_len < Self::ENCODED_LEN {
10755            payload_buf[0..avail_len].copy_from_slice(__input);
10756            Bytes::new(&payload_buf)
10757        } else {
10758            Bytes::new(__input)
10759        };
10760        let mut __struct = Self::default();
10761        __struct.time_usec = buf.get_u64_le();
10762        __struct.x_acc = buf.get_f32_le();
10763        __struct.y_acc = buf.get_f32_le();
10764        __struct.z_acc = buf.get_f32_le();
10765        __struct.x_vel = buf.get_f32_le();
10766        __struct.y_vel = buf.get_f32_le();
10767        __struct.z_vel = buf.get_f32_le();
10768        __struct.x_pos = buf.get_f32_le();
10769        __struct.y_pos = buf.get_f32_le();
10770        __struct.z_pos = buf.get_f32_le();
10771        __struct.airspeed = buf.get_f32_le();
10772        for v in &mut __struct.vel_variance {
10773            let val = buf.get_f32_le();
10774            *v = val;
10775        }
10776        for v in &mut __struct.pos_variance {
10777            let val = buf.get_f32_le();
10778            *v = val;
10779        }
10780        for v in &mut __struct.q {
10781            let val = buf.get_f32_le();
10782            *v = val;
10783        }
10784        __struct.roll_rate = buf.get_f32_le();
10785        __struct.pitch_rate = buf.get_f32_le();
10786        __struct.yaw_rate = buf.get_f32_le();
10787        Ok(__struct)
10788    }
10789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10790        let mut __tmp = BytesMut::new(bytes);
10791        #[allow(clippy::absurd_extreme_comparisons)]
10792        #[allow(unused_comparisons)]
10793        if __tmp.remaining() < Self::ENCODED_LEN {
10794            panic!(
10795                "buffer is too small (need {} bytes, but got {})",
10796                Self::ENCODED_LEN,
10797                __tmp.remaining(),
10798            )
10799        }
10800        __tmp.put_u64_le(self.time_usec);
10801        __tmp.put_f32_le(self.x_acc);
10802        __tmp.put_f32_le(self.y_acc);
10803        __tmp.put_f32_le(self.z_acc);
10804        __tmp.put_f32_le(self.x_vel);
10805        __tmp.put_f32_le(self.y_vel);
10806        __tmp.put_f32_le(self.z_vel);
10807        __tmp.put_f32_le(self.x_pos);
10808        __tmp.put_f32_le(self.y_pos);
10809        __tmp.put_f32_le(self.z_pos);
10810        __tmp.put_f32_le(self.airspeed);
10811        for val in &self.vel_variance {
10812            __tmp.put_f32_le(*val);
10813        }
10814        for val in &self.pos_variance {
10815            __tmp.put_f32_le(*val);
10816        }
10817        for val in &self.q {
10818            __tmp.put_f32_le(*val);
10819        }
10820        __tmp.put_f32_le(self.roll_rate);
10821        __tmp.put_f32_le(self.pitch_rate);
10822        __tmp.put_f32_le(self.yaw_rate);
10823        if matches!(version, MavlinkVersion::V2) {
10824            let len = __tmp.len();
10825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10826        } else {
10827            __tmp.len()
10828        }
10829    }
10830}
10831#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10832#[doc = ""]
10833#[doc = "ID: 411"]
10834#[derive(Debug, Clone, PartialEq)]
10835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10837#[cfg_attr(feature = "ts", derive(TS))]
10838#[cfg_attr(feature = "ts", ts(export))]
10839pub struct CURRENT_EVENT_SEQUENCE_DATA {
10840    #[doc = "Sequence number."]
10841    pub sequence: u16,
10842    #[doc = "Flag bitset."]
10843    pub flags: MavEventCurrentSequenceFlags,
10844}
10845impl CURRENT_EVENT_SEQUENCE_DATA {
10846    pub const ENCODED_LEN: usize = 3usize;
10847    pub const DEFAULT: Self = Self {
10848        sequence: 0_u16,
10849        flags: MavEventCurrentSequenceFlags::DEFAULT,
10850    };
10851    #[cfg(feature = "arbitrary")]
10852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10853        use arbitrary::{Arbitrary, Unstructured};
10854        let mut buf = [0u8; 1024];
10855        rng.fill_bytes(&mut buf);
10856        let mut unstructured = Unstructured::new(&buf);
10857        Self::arbitrary(&mut unstructured).unwrap_or_default()
10858    }
10859}
10860impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10861    fn default() -> Self {
10862        Self::DEFAULT.clone()
10863    }
10864}
10865impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10866    type Message = MavMessage;
10867    const ID: u32 = 411u32;
10868    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10869    const EXTRA_CRC: u8 = 106u8;
10870    const ENCODED_LEN: usize = 3usize;
10871    fn deser(
10872        _version: MavlinkVersion,
10873        __input: &[u8],
10874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10875        let avail_len = __input.len();
10876        let mut payload_buf = [0; Self::ENCODED_LEN];
10877        let mut buf = if avail_len < Self::ENCODED_LEN {
10878            payload_buf[0..avail_len].copy_from_slice(__input);
10879            Bytes::new(&payload_buf)
10880        } else {
10881            Bytes::new(__input)
10882        };
10883        let mut __struct = Self::default();
10884        __struct.sequence = buf.get_u16_le();
10885        let tmp = buf.get_u8();
10886        __struct.flags =
10887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10888                enum_type: "MavEventCurrentSequenceFlags",
10889                value: tmp as u64,
10890            })?;
10891        Ok(__struct)
10892    }
10893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10894        let mut __tmp = BytesMut::new(bytes);
10895        #[allow(clippy::absurd_extreme_comparisons)]
10896        #[allow(unused_comparisons)]
10897        if __tmp.remaining() < Self::ENCODED_LEN {
10898            panic!(
10899                "buffer is too small (need {} bytes, but got {})",
10900                Self::ENCODED_LEN,
10901                __tmp.remaining(),
10902            )
10903        }
10904        __tmp.put_u16_le(self.sequence);
10905        __tmp.put_u8(self.flags as u8);
10906        if matches!(version, MavlinkVersion::V2) {
10907            let len = __tmp.len();
10908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10909        } else {
10910            __tmp.len()
10911        }
10912    }
10913}
10914#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10915#[doc = ""]
10916#[doc = "ID: 436"]
10917#[derive(Debug, Clone, PartialEq)]
10918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10920#[cfg_attr(feature = "ts", derive(TS))]
10921#[cfg_attr(feature = "ts", ts(export))]
10922pub struct CURRENT_MODE_DATA {
10923    #[doc = "A bitfield for use for autopilot-specific flags"]
10924    pub custom_mode: u32,
10925    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10926    pub intended_custom_mode: u32,
10927    #[doc = "Standard mode."]
10928    pub standard_mode: MavStandardMode,
10929}
10930impl CURRENT_MODE_DATA {
10931    pub const ENCODED_LEN: usize = 9usize;
10932    pub const DEFAULT: Self = Self {
10933        custom_mode: 0_u32,
10934        intended_custom_mode: 0_u32,
10935        standard_mode: MavStandardMode::DEFAULT,
10936    };
10937    #[cfg(feature = "arbitrary")]
10938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10939        use arbitrary::{Arbitrary, Unstructured};
10940        let mut buf = [0u8; 1024];
10941        rng.fill_bytes(&mut buf);
10942        let mut unstructured = Unstructured::new(&buf);
10943        Self::arbitrary(&mut unstructured).unwrap_or_default()
10944    }
10945}
10946impl Default for CURRENT_MODE_DATA {
10947    fn default() -> Self {
10948        Self::DEFAULT.clone()
10949    }
10950}
10951impl MessageData for CURRENT_MODE_DATA {
10952    type Message = MavMessage;
10953    const ID: u32 = 436u32;
10954    const NAME: &'static str = "CURRENT_MODE";
10955    const EXTRA_CRC: u8 = 193u8;
10956    const ENCODED_LEN: usize = 9usize;
10957    fn deser(
10958        _version: MavlinkVersion,
10959        __input: &[u8],
10960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10961        let avail_len = __input.len();
10962        let mut payload_buf = [0; Self::ENCODED_LEN];
10963        let mut buf = if avail_len < Self::ENCODED_LEN {
10964            payload_buf[0..avail_len].copy_from_slice(__input);
10965            Bytes::new(&payload_buf)
10966        } else {
10967            Bytes::new(__input)
10968        };
10969        let mut __struct = Self::default();
10970        __struct.custom_mode = buf.get_u32_le();
10971        __struct.intended_custom_mode = buf.get_u32_le();
10972        let tmp = buf.get_u8();
10973        __struct.standard_mode =
10974            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10975                enum_type: "MavStandardMode",
10976                value: tmp as u64,
10977            })?;
10978        Ok(__struct)
10979    }
10980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10981        let mut __tmp = BytesMut::new(bytes);
10982        #[allow(clippy::absurd_extreme_comparisons)]
10983        #[allow(unused_comparisons)]
10984        if __tmp.remaining() < Self::ENCODED_LEN {
10985            panic!(
10986                "buffer is too small (need {} bytes, but got {})",
10987                Self::ENCODED_LEN,
10988                __tmp.remaining(),
10989            )
10990        }
10991        __tmp.put_u32_le(self.custom_mode);
10992        __tmp.put_u32_le(self.intended_custom_mode);
10993        __tmp.put_u8(self.standard_mode as u8);
10994        if matches!(version, MavlinkVersion::V2) {
10995            let len = __tmp.len();
10996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10997        } else {
10998            __tmp.len()
10999        }
11000    }
11001}
11002#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
11003#[doc = "Data stream status information."]
11004#[doc = ""]
11005#[doc = "ID: 67"]
11006#[derive(Debug, Clone, PartialEq)]
11007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11009#[cfg_attr(feature = "ts", derive(TS))]
11010#[cfg_attr(feature = "ts", ts(export))]
11011pub struct DATA_STREAM_DATA {
11012    #[doc = "The message rate"]
11013    pub message_rate: u16,
11014    #[doc = "The ID of the requested data stream"]
11015    pub stream_id: u8,
11016    #[doc = "1 stream is enabled, 0 stream is stopped."]
11017    pub on_off: u8,
11018}
11019impl DATA_STREAM_DATA {
11020    pub const ENCODED_LEN: usize = 4usize;
11021    pub const DEFAULT: Self = Self {
11022        message_rate: 0_u16,
11023        stream_id: 0_u8,
11024        on_off: 0_u8,
11025    };
11026    #[cfg(feature = "arbitrary")]
11027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11028        use arbitrary::{Arbitrary, Unstructured};
11029        let mut buf = [0u8; 1024];
11030        rng.fill_bytes(&mut buf);
11031        let mut unstructured = Unstructured::new(&buf);
11032        Self::arbitrary(&mut unstructured).unwrap_or_default()
11033    }
11034}
11035impl Default for DATA_STREAM_DATA {
11036    fn default() -> Self {
11037        Self::DEFAULT.clone()
11038    }
11039}
11040impl MessageData for DATA_STREAM_DATA {
11041    type Message = MavMessage;
11042    const ID: u32 = 67u32;
11043    const NAME: &'static str = "DATA_STREAM";
11044    const EXTRA_CRC: u8 = 21u8;
11045    const ENCODED_LEN: usize = 4usize;
11046    fn deser(
11047        _version: MavlinkVersion,
11048        __input: &[u8],
11049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11050        let avail_len = __input.len();
11051        let mut payload_buf = [0; Self::ENCODED_LEN];
11052        let mut buf = if avail_len < Self::ENCODED_LEN {
11053            payload_buf[0..avail_len].copy_from_slice(__input);
11054            Bytes::new(&payload_buf)
11055        } else {
11056            Bytes::new(__input)
11057        };
11058        let mut __struct = Self::default();
11059        __struct.message_rate = buf.get_u16_le();
11060        __struct.stream_id = buf.get_u8();
11061        __struct.on_off = buf.get_u8();
11062        Ok(__struct)
11063    }
11064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11065        let mut __tmp = BytesMut::new(bytes);
11066        #[allow(clippy::absurd_extreme_comparisons)]
11067        #[allow(unused_comparisons)]
11068        if __tmp.remaining() < Self::ENCODED_LEN {
11069            panic!(
11070                "buffer is too small (need {} bytes, but got {})",
11071                Self::ENCODED_LEN,
11072                __tmp.remaining(),
11073            )
11074        }
11075        __tmp.put_u16_le(self.message_rate);
11076        __tmp.put_u8(self.stream_id);
11077        __tmp.put_u8(self.on_off);
11078        if matches!(version, MavlinkVersion::V2) {
11079            let len = __tmp.len();
11080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11081        } else {
11082            __tmp.len()
11083        }
11084    }
11085}
11086#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11087#[doc = ""]
11088#[doc = "ID: 130"]
11089#[derive(Debug, Clone, PartialEq)]
11090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11092#[cfg_attr(feature = "ts", derive(TS))]
11093#[cfg_attr(feature = "ts", ts(export))]
11094pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11095    #[doc = "total data size (set on ACK only)."]
11096    pub size: u32,
11097    #[doc = "Width of a matrix or image."]
11098    pub width: u16,
11099    #[doc = "Height of a matrix or image."]
11100    pub height: u16,
11101    #[doc = "Number of packets being sent (set on ACK only)."]
11102    pub packets: u16,
11103    #[doc = "Type of requested/acknowledged data."]
11104    pub mavtype: MavlinkDataStreamType,
11105    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11106    pub payload: u8,
11107    #[doc = "JPEG quality. Values: [1-100]."]
11108    pub jpg_quality: u8,
11109}
11110impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11111    pub const ENCODED_LEN: usize = 13usize;
11112    pub const DEFAULT: Self = Self {
11113        size: 0_u32,
11114        width: 0_u16,
11115        height: 0_u16,
11116        packets: 0_u16,
11117        mavtype: MavlinkDataStreamType::DEFAULT,
11118        payload: 0_u8,
11119        jpg_quality: 0_u8,
11120    };
11121    #[cfg(feature = "arbitrary")]
11122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11123        use arbitrary::{Arbitrary, Unstructured};
11124        let mut buf = [0u8; 1024];
11125        rng.fill_bytes(&mut buf);
11126        let mut unstructured = Unstructured::new(&buf);
11127        Self::arbitrary(&mut unstructured).unwrap_or_default()
11128    }
11129}
11130impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11131    fn default() -> Self {
11132        Self::DEFAULT.clone()
11133    }
11134}
11135impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11136    type Message = MavMessage;
11137    const ID: u32 = 130u32;
11138    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11139    const EXTRA_CRC: u8 = 29u8;
11140    const ENCODED_LEN: usize = 13usize;
11141    fn deser(
11142        _version: MavlinkVersion,
11143        __input: &[u8],
11144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11145        let avail_len = __input.len();
11146        let mut payload_buf = [0; Self::ENCODED_LEN];
11147        let mut buf = if avail_len < Self::ENCODED_LEN {
11148            payload_buf[0..avail_len].copy_from_slice(__input);
11149            Bytes::new(&payload_buf)
11150        } else {
11151            Bytes::new(__input)
11152        };
11153        let mut __struct = Self::default();
11154        __struct.size = buf.get_u32_le();
11155        __struct.width = buf.get_u16_le();
11156        __struct.height = buf.get_u16_le();
11157        __struct.packets = buf.get_u16_le();
11158        let tmp = buf.get_u8();
11159        __struct.mavtype =
11160            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11161                enum_type: "MavlinkDataStreamType",
11162                value: tmp as u64,
11163            })?;
11164        __struct.payload = buf.get_u8();
11165        __struct.jpg_quality = buf.get_u8();
11166        Ok(__struct)
11167    }
11168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11169        let mut __tmp = BytesMut::new(bytes);
11170        #[allow(clippy::absurd_extreme_comparisons)]
11171        #[allow(unused_comparisons)]
11172        if __tmp.remaining() < Self::ENCODED_LEN {
11173            panic!(
11174                "buffer is too small (need {} bytes, but got {})",
11175                Self::ENCODED_LEN,
11176                __tmp.remaining(),
11177            )
11178        }
11179        __tmp.put_u32_le(self.size);
11180        __tmp.put_u16_le(self.width);
11181        __tmp.put_u16_le(self.height);
11182        __tmp.put_u16_le(self.packets);
11183        __tmp.put_u8(self.mavtype as u8);
11184        __tmp.put_u8(self.payload);
11185        __tmp.put_u8(self.jpg_quality);
11186        if matches!(version, MavlinkVersion::V2) {
11187            let len = __tmp.len();
11188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11189        } else {
11190            __tmp.len()
11191        }
11192    }
11193}
11194#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
11195#[doc = ""]
11196#[doc = "ID: 254"]
11197#[derive(Debug, Clone, PartialEq)]
11198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11200#[cfg_attr(feature = "ts", derive(TS))]
11201#[cfg_attr(feature = "ts", ts(export))]
11202pub struct DEBUG_DATA {
11203    #[doc = "Timestamp (time since system boot)."]
11204    pub time_boot_ms: u32,
11205    #[doc = "DEBUG value"]
11206    pub value: f32,
11207    #[doc = "index of debug variable"]
11208    pub ind: u8,
11209}
11210impl DEBUG_DATA {
11211    pub const ENCODED_LEN: usize = 9usize;
11212    pub const DEFAULT: Self = Self {
11213        time_boot_ms: 0_u32,
11214        value: 0.0_f32,
11215        ind: 0_u8,
11216    };
11217    #[cfg(feature = "arbitrary")]
11218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11219        use arbitrary::{Arbitrary, Unstructured};
11220        let mut buf = [0u8; 1024];
11221        rng.fill_bytes(&mut buf);
11222        let mut unstructured = Unstructured::new(&buf);
11223        Self::arbitrary(&mut unstructured).unwrap_or_default()
11224    }
11225}
11226impl Default for DEBUG_DATA {
11227    fn default() -> Self {
11228        Self::DEFAULT.clone()
11229    }
11230}
11231impl MessageData for DEBUG_DATA {
11232    type Message = MavMessage;
11233    const ID: u32 = 254u32;
11234    const NAME: &'static str = "DEBUG";
11235    const EXTRA_CRC: u8 = 46u8;
11236    const ENCODED_LEN: usize = 9usize;
11237    fn deser(
11238        _version: MavlinkVersion,
11239        __input: &[u8],
11240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11241        let avail_len = __input.len();
11242        let mut payload_buf = [0; Self::ENCODED_LEN];
11243        let mut buf = if avail_len < Self::ENCODED_LEN {
11244            payload_buf[0..avail_len].copy_from_slice(__input);
11245            Bytes::new(&payload_buf)
11246        } else {
11247            Bytes::new(__input)
11248        };
11249        let mut __struct = Self::default();
11250        __struct.time_boot_ms = buf.get_u32_le();
11251        __struct.value = buf.get_f32_le();
11252        __struct.ind = buf.get_u8();
11253        Ok(__struct)
11254    }
11255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11256        let mut __tmp = BytesMut::new(bytes);
11257        #[allow(clippy::absurd_extreme_comparisons)]
11258        #[allow(unused_comparisons)]
11259        if __tmp.remaining() < Self::ENCODED_LEN {
11260            panic!(
11261                "buffer is too small (need {} bytes, but got {})",
11262                Self::ENCODED_LEN,
11263                __tmp.remaining(),
11264            )
11265        }
11266        __tmp.put_u32_le(self.time_boot_ms);
11267        __tmp.put_f32_le(self.value);
11268        __tmp.put_u8(self.ind);
11269        if matches!(version, MavlinkVersion::V2) {
11270            let len = __tmp.len();
11271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11272        } else {
11273            __tmp.len()
11274        }
11275    }
11276}
11277#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
11278#[doc = ""]
11279#[doc = "ID: 350"]
11280#[derive(Debug, Clone, PartialEq)]
11281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11283#[cfg_attr(feature = "ts", derive(TS))]
11284#[cfg_attr(feature = "ts", ts(export))]
11285pub struct DEBUG_FLOAT_ARRAY_DATA {
11286    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11287    pub time_usec: u64,
11288    #[doc = "Unique ID used to discriminate between arrays"]
11289    pub array_id: u16,
11290    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11291    #[cfg_attr(feature = "ts", ts(type = "string"))]
11292    pub name: CharArray<10>,
11293    #[doc = "data"]
11294    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11295    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11296    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11297    pub data: [f32; 58],
11298}
11299impl DEBUG_FLOAT_ARRAY_DATA {
11300    pub const ENCODED_LEN: usize = 252usize;
11301    pub const DEFAULT: Self = Self {
11302        time_usec: 0_u64,
11303        array_id: 0_u16,
11304        name: CharArray::new([0_u8; 10usize]),
11305        data: [0.0_f32; 58usize],
11306    };
11307    #[cfg(feature = "arbitrary")]
11308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11309        use arbitrary::{Arbitrary, Unstructured};
11310        let mut buf = [0u8; 1024];
11311        rng.fill_bytes(&mut buf);
11312        let mut unstructured = Unstructured::new(&buf);
11313        Self::arbitrary(&mut unstructured).unwrap_or_default()
11314    }
11315}
11316impl Default for DEBUG_FLOAT_ARRAY_DATA {
11317    fn default() -> Self {
11318        Self::DEFAULT.clone()
11319    }
11320}
11321impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11322    type Message = MavMessage;
11323    const ID: u32 = 350u32;
11324    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11325    const EXTRA_CRC: u8 = 232u8;
11326    const ENCODED_LEN: usize = 252usize;
11327    fn deser(
11328        _version: MavlinkVersion,
11329        __input: &[u8],
11330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11331        let avail_len = __input.len();
11332        let mut payload_buf = [0; Self::ENCODED_LEN];
11333        let mut buf = if avail_len < Self::ENCODED_LEN {
11334            payload_buf[0..avail_len].copy_from_slice(__input);
11335            Bytes::new(&payload_buf)
11336        } else {
11337            Bytes::new(__input)
11338        };
11339        let mut __struct = Self::default();
11340        __struct.time_usec = buf.get_u64_le();
11341        __struct.array_id = buf.get_u16_le();
11342        let mut tmp = [0_u8; 10usize];
11343        for v in &mut tmp {
11344            *v = buf.get_u8();
11345        }
11346        __struct.name = CharArray::new(tmp);
11347        for v in &mut __struct.data {
11348            let val = buf.get_f32_le();
11349            *v = val;
11350        }
11351        Ok(__struct)
11352    }
11353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11354        let mut __tmp = BytesMut::new(bytes);
11355        #[allow(clippy::absurd_extreme_comparisons)]
11356        #[allow(unused_comparisons)]
11357        if __tmp.remaining() < Self::ENCODED_LEN {
11358            panic!(
11359                "buffer is too small (need {} bytes, but got {})",
11360                Self::ENCODED_LEN,
11361                __tmp.remaining(),
11362            )
11363        }
11364        __tmp.put_u64_le(self.time_usec);
11365        __tmp.put_u16_le(self.array_id);
11366        for val in &self.name {
11367            __tmp.put_u8(*val);
11368        }
11369        if matches!(version, MavlinkVersion::V2) {
11370            for val in &self.data {
11371                __tmp.put_f32_le(*val);
11372            }
11373            let len = __tmp.len();
11374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11375        } else {
11376            __tmp.len()
11377        }
11378    }
11379}
11380#[doc = "To debug something using a named 3D vector."]
11381#[doc = ""]
11382#[doc = "ID: 250"]
11383#[derive(Debug, Clone, PartialEq)]
11384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11386#[cfg_attr(feature = "ts", derive(TS))]
11387#[cfg_attr(feature = "ts", ts(export))]
11388pub struct DEBUG_VECT_DATA {
11389    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11390    pub time_usec: u64,
11391    #[doc = "x"]
11392    pub x: f32,
11393    #[doc = "y"]
11394    pub y: f32,
11395    #[doc = "z"]
11396    pub z: f32,
11397    #[doc = "Name"]
11398    #[cfg_attr(feature = "ts", ts(type = "string"))]
11399    pub name: CharArray<10>,
11400}
11401impl DEBUG_VECT_DATA {
11402    pub const ENCODED_LEN: usize = 30usize;
11403    pub const DEFAULT: Self = Self {
11404        time_usec: 0_u64,
11405        x: 0.0_f32,
11406        y: 0.0_f32,
11407        z: 0.0_f32,
11408        name: CharArray::new([0_u8; 10usize]),
11409    };
11410    #[cfg(feature = "arbitrary")]
11411    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11412        use arbitrary::{Arbitrary, Unstructured};
11413        let mut buf = [0u8; 1024];
11414        rng.fill_bytes(&mut buf);
11415        let mut unstructured = Unstructured::new(&buf);
11416        Self::arbitrary(&mut unstructured).unwrap_or_default()
11417    }
11418}
11419impl Default for DEBUG_VECT_DATA {
11420    fn default() -> Self {
11421        Self::DEFAULT.clone()
11422    }
11423}
11424impl MessageData for DEBUG_VECT_DATA {
11425    type Message = MavMessage;
11426    const ID: u32 = 250u32;
11427    const NAME: &'static str = "DEBUG_VECT";
11428    const EXTRA_CRC: u8 = 49u8;
11429    const ENCODED_LEN: usize = 30usize;
11430    fn deser(
11431        _version: MavlinkVersion,
11432        __input: &[u8],
11433    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11434        let avail_len = __input.len();
11435        let mut payload_buf = [0; Self::ENCODED_LEN];
11436        let mut buf = if avail_len < Self::ENCODED_LEN {
11437            payload_buf[0..avail_len].copy_from_slice(__input);
11438            Bytes::new(&payload_buf)
11439        } else {
11440            Bytes::new(__input)
11441        };
11442        let mut __struct = Self::default();
11443        __struct.time_usec = buf.get_u64_le();
11444        __struct.x = buf.get_f32_le();
11445        __struct.y = buf.get_f32_le();
11446        __struct.z = buf.get_f32_le();
11447        let mut tmp = [0_u8; 10usize];
11448        for v in &mut tmp {
11449            *v = buf.get_u8();
11450        }
11451        __struct.name = CharArray::new(tmp);
11452        Ok(__struct)
11453    }
11454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11455        let mut __tmp = BytesMut::new(bytes);
11456        #[allow(clippy::absurd_extreme_comparisons)]
11457        #[allow(unused_comparisons)]
11458        if __tmp.remaining() < Self::ENCODED_LEN {
11459            panic!(
11460                "buffer is too small (need {} bytes, but got {})",
11461                Self::ENCODED_LEN,
11462                __tmp.remaining(),
11463            )
11464        }
11465        __tmp.put_u64_le(self.time_usec);
11466        __tmp.put_f32_le(self.x);
11467        __tmp.put_f32_le(self.y);
11468        __tmp.put_f32_le(self.z);
11469        for val in &self.name {
11470            __tmp.put_u8(*val);
11471        }
11472        if matches!(version, MavlinkVersion::V2) {
11473            let len = __tmp.len();
11474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11475        } else {
11476            __tmp.len()
11477        }
11478    }
11479}
11480#[doc = "Distance sensor information for an onboard rangefinder."]
11481#[doc = ""]
11482#[doc = "ID: 132"]
11483#[derive(Debug, Clone, PartialEq)]
11484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11486#[cfg_attr(feature = "ts", derive(TS))]
11487#[cfg_attr(feature = "ts", ts(export))]
11488pub struct DISTANCE_SENSOR_DATA {
11489    #[doc = "Timestamp (time since system boot)."]
11490    pub time_boot_ms: u32,
11491    #[doc = "Minimum distance the sensor can measure"]
11492    pub min_distance: u16,
11493    #[doc = "Maximum distance the sensor can measure"]
11494    pub max_distance: u16,
11495    #[doc = "Current distance reading"]
11496    pub current_distance: u16,
11497    #[doc = "Type of distance sensor."]
11498    pub mavtype: MavDistanceSensor,
11499    #[doc = "Onboard ID of the sensor"]
11500    pub id: u8,
11501    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11502    pub orientation: MavSensorOrientation,
11503    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11504    pub covariance: u8,
11505    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11507    pub horizontal_fov: f32,
11508    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11510    pub vertical_fov: f32,
11511    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11514    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11515    pub quaternion: [f32; 4],
11516    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11517    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11518    pub signal_quality: u8,
11519}
11520impl DISTANCE_SENSOR_DATA {
11521    pub const ENCODED_LEN: usize = 39usize;
11522    pub const DEFAULT: Self = Self {
11523        time_boot_ms: 0_u32,
11524        min_distance: 0_u16,
11525        max_distance: 0_u16,
11526        current_distance: 0_u16,
11527        mavtype: MavDistanceSensor::DEFAULT,
11528        id: 0_u8,
11529        orientation: MavSensorOrientation::DEFAULT,
11530        covariance: 0_u8,
11531        horizontal_fov: 0.0_f32,
11532        vertical_fov: 0.0_f32,
11533        quaternion: [0.0_f32; 4usize],
11534        signal_quality: 0_u8,
11535    };
11536    #[cfg(feature = "arbitrary")]
11537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11538        use arbitrary::{Arbitrary, Unstructured};
11539        let mut buf = [0u8; 1024];
11540        rng.fill_bytes(&mut buf);
11541        let mut unstructured = Unstructured::new(&buf);
11542        Self::arbitrary(&mut unstructured).unwrap_or_default()
11543    }
11544}
11545impl Default for DISTANCE_SENSOR_DATA {
11546    fn default() -> Self {
11547        Self::DEFAULT.clone()
11548    }
11549}
11550impl MessageData for DISTANCE_SENSOR_DATA {
11551    type Message = MavMessage;
11552    const ID: u32 = 132u32;
11553    const NAME: &'static str = "DISTANCE_SENSOR";
11554    const EXTRA_CRC: u8 = 85u8;
11555    const ENCODED_LEN: usize = 39usize;
11556    fn deser(
11557        _version: MavlinkVersion,
11558        __input: &[u8],
11559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11560        let avail_len = __input.len();
11561        let mut payload_buf = [0; Self::ENCODED_LEN];
11562        let mut buf = if avail_len < Self::ENCODED_LEN {
11563            payload_buf[0..avail_len].copy_from_slice(__input);
11564            Bytes::new(&payload_buf)
11565        } else {
11566            Bytes::new(__input)
11567        };
11568        let mut __struct = Self::default();
11569        __struct.time_boot_ms = buf.get_u32_le();
11570        __struct.min_distance = buf.get_u16_le();
11571        __struct.max_distance = buf.get_u16_le();
11572        __struct.current_distance = buf.get_u16_le();
11573        let tmp = buf.get_u8();
11574        __struct.mavtype =
11575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11576                enum_type: "MavDistanceSensor",
11577                value: tmp as u64,
11578            })?;
11579        __struct.id = buf.get_u8();
11580        let tmp = buf.get_u8();
11581        __struct.orientation =
11582            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11583                enum_type: "MavSensorOrientation",
11584                value: tmp as u64,
11585            })?;
11586        __struct.covariance = buf.get_u8();
11587        __struct.horizontal_fov = buf.get_f32_le();
11588        __struct.vertical_fov = buf.get_f32_le();
11589        for v in &mut __struct.quaternion {
11590            let val = buf.get_f32_le();
11591            *v = val;
11592        }
11593        __struct.signal_quality = buf.get_u8();
11594        Ok(__struct)
11595    }
11596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11597        let mut __tmp = BytesMut::new(bytes);
11598        #[allow(clippy::absurd_extreme_comparisons)]
11599        #[allow(unused_comparisons)]
11600        if __tmp.remaining() < Self::ENCODED_LEN {
11601            panic!(
11602                "buffer is too small (need {} bytes, but got {})",
11603                Self::ENCODED_LEN,
11604                __tmp.remaining(),
11605            )
11606        }
11607        __tmp.put_u32_le(self.time_boot_ms);
11608        __tmp.put_u16_le(self.min_distance);
11609        __tmp.put_u16_le(self.max_distance);
11610        __tmp.put_u16_le(self.current_distance);
11611        __tmp.put_u8(self.mavtype as u8);
11612        __tmp.put_u8(self.id);
11613        __tmp.put_u8(self.orientation as u8);
11614        __tmp.put_u8(self.covariance);
11615        if matches!(version, MavlinkVersion::V2) {
11616            __tmp.put_f32_le(self.horizontal_fov);
11617            __tmp.put_f32_le(self.vertical_fov);
11618            for val in &self.quaternion {
11619                __tmp.put_f32_le(*val);
11620            }
11621            __tmp.put_u8(self.signal_quality);
11622            let len = __tmp.len();
11623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11624        } else {
11625            __tmp.len()
11626        }
11627    }
11628}
11629#[doc = "EFI status output."]
11630#[doc = ""]
11631#[doc = "ID: 225"]
11632#[derive(Debug, Clone, PartialEq)]
11633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11635#[cfg_attr(feature = "ts", derive(TS))]
11636#[cfg_attr(feature = "ts", ts(export))]
11637pub struct EFI_STATUS_DATA {
11638    #[doc = "ECU index"]
11639    pub ecu_index: f32,
11640    #[doc = "RPM"]
11641    pub rpm: f32,
11642    #[doc = "Fuel consumed"]
11643    pub fuel_consumed: f32,
11644    #[doc = "Fuel flow rate"]
11645    pub fuel_flow: f32,
11646    #[doc = "Engine load"]
11647    pub engine_load: f32,
11648    #[doc = "Throttle position"]
11649    pub throttle_position: f32,
11650    #[doc = "Spark dwell time"]
11651    pub spark_dwell_time: f32,
11652    #[doc = "Barometric pressure"]
11653    pub barometric_pressure: f32,
11654    #[doc = "Intake manifold pressure("]
11655    pub intake_manifold_pressure: f32,
11656    #[doc = "Intake manifold temperature"]
11657    pub intake_manifold_temperature: f32,
11658    #[doc = "Cylinder head temperature"]
11659    pub cylinder_head_temperature: f32,
11660    #[doc = "Ignition timing (Crank angle degrees)"]
11661    pub ignition_timing: f32,
11662    #[doc = "Injection time"]
11663    pub injection_time: f32,
11664    #[doc = "Exhaust gas temperature"]
11665    pub exhaust_gas_temperature: f32,
11666    #[doc = "Output throttle"]
11667    pub throttle_out: f32,
11668    #[doc = "Pressure/temperature compensation"]
11669    pub pt_compensation: f32,
11670    #[doc = "EFI health status"]
11671    pub health: u8,
11672    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11674    pub ignition_voltage: f32,
11675    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11677    pub fuel_pressure: f32,
11678}
11679impl EFI_STATUS_DATA {
11680    pub const ENCODED_LEN: usize = 73usize;
11681    pub const DEFAULT: Self = Self {
11682        ecu_index: 0.0_f32,
11683        rpm: 0.0_f32,
11684        fuel_consumed: 0.0_f32,
11685        fuel_flow: 0.0_f32,
11686        engine_load: 0.0_f32,
11687        throttle_position: 0.0_f32,
11688        spark_dwell_time: 0.0_f32,
11689        barometric_pressure: 0.0_f32,
11690        intake_manifold_pressure: 0.0_f32,
11691        intake_manifold_temperature: 0.0_f32,
11692        cylinder_head_temperature: 0.0_f32,
11693        ignition_timing: 0.0_f32,
11694        injection_time: 0.0_f32,
11695        exhaust_gas_temperature: 0.0_f32,
11696        throttle_out: 0.0_f32,
11697        pt_compensation: 0.0_f32,
11698        health: 0_u8,
11699        ignition_voltage: 0.0_f32,
11700        fuel_pressure: 0.0_f32,
11701    };
11702    #[cfg(feature = "arbitrary")]
11703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11704        use arbitrary::{Arbitrary, Unstructured};
11705        let mut buf = [0u8; 1024];
11706        rng.fill_bytes(&mut buf);
11707        let mut unstructured = Unstructured::new(&buf);
11708        Self::arbitrary(&mut unstructured).unwrap_or_default()
11709    }
11710}
11711impl Default for EFI_STATUS_DATA {
11712    fn default() -> Self {
11713        Self::DEFAULT.clone()
11714    }
11715}
11716impl MessageData for EFI_STATUS_DATA {
11717    type Message = MavMessage;
11718    const ID: u32 = 225u32;
11719    const NAME: &'static str = "EFI_STATUS";
11720    const EXTRA_CRC: u8 = 208u8;
11721    const ENCODED_LEN: usize = 73usize;
11722    fn deser(
11723        _version: MavlinkVersion,
11724        __input: &[u8],
11725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11726        let avail_len = __input.len();
11727        let mut payload_buf = [0; Self::ENCODED_LEN];
11728        let mut buf = if avail_len < Self::ENCODED_LEN {
11729            payload_buf[0..avail_len].copy_from_slice(__input);
11730            Bytes::new(&payload_buf)
11731        } else {
11732            Bytes::new(__input)
11733        };
11734        let mut __struct = Self::default();
11735        __struct.ecu_index = buf.get_f32_le();
11736        __struct.rpm = buf.get_f32_le();
11737        __struct.fuel_consumed = buf.get_f32_le();
11738        __struct.fuel_flow = buf.get_f32_le();
11739        __struct.engine_load = buf.get_f32_le();
11740        __struct.throttle_position = buf.get_f32_le();
11741        __struct.spark_dwell_time = buf.get_f32_le();
11742        __struct.barometric_pressure = buf.get_f32_le();
11743        __struct.intake_manifold_pressure = buf.get_f32_le();
11744        __struct.intake_manifold_temperature = buf.get_f32_le();
11745        __struct.cylinder_head_temperature = buf.get_f32_le();
11746        __struct.ignition_timing = buf.get_f32_le();
11747        __struct.injection_time = buf.get_f32_le();
11748        __struct.exhaust_gas_temperature = buf.get_f32_le();
11749        __struct.throttle_out = buf.get_f32_le();
11750        __struct.pt_compensation = buf.get_f32_le();
11751        __struct.health = buf.get_u8();
11752        __struct.ignition_voltage = buf.get_f32_le();
11753        __struct.fuel_pressure = buf.get_f32_le();
11754        Ok(__struct)
11755    }
11756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11757        let mut __tmp = BytesMut::new(bytes);
11758        #[allow(clippy::absurd_extreme_comparisons)]
11759        #[allow(unused_comparisons)]
11760        if __tmp.remaining() < Self::ENCODED_LEN {
11761            panic!(
11762                "buffer is too small (need {} bytes, but got {})",
11763                Self::ENCODED_LEN,
11764                __tmp.remaining(),
11765            )
11766        }
11767        __tmp.put_f32_le(self.ecu_index);
11768        __tmp.put_f32_le(self.rpm);
11769        __tmp.put_f32_le(self.fuel_consumed);
11770        __tmp.put_f32_le(self.fuel_flow);
11771        __tmp.put_f32_le(self.engine_load);
11772        __tmp.put_f32_le(self.throttle_position);
11773        __tmp.put_f32_le(self.spark_dwell_time);
11774        __tmp.put_f32_le(self.barometric_pressure);
11775        __tmp.put_f32_le(self.intake_manifold_pressure);
11776        __tmp.put_f32_le(self.intake_manifold_temperature);
11777        __tmp.put_f32_le(self.cylinder_head_temperature);
11778        __tmp.put_f32_le(self.ignition_timing);
11779        __tmp.put_f32_le(self.injection_time);
11780        __tmp.put_f32_le(self.exhaust_gas_temperature);
11781        __tmp.put_f32_le(self.throttle_out);
11782        __tmp.put_f32_le(self.pt_compensation);
11783        __tmp.put_u8(self.health);
11784        if matches!(version, MavlinkVersion::V2) {
11785            __tmp.put_f32_le(self.ignition_voltage);
11786            __tmp.put_f32_le(self.fuel_pressure);
11787            let len = __tmp.len();
11788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11789        } else {
11790            __tmp.len()
11791        }
11792    }
11793}
11794#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11795#[doc = ""]
11796#[doc = "ID: 131"]
11797#[derive(Debug, Clone, PartialEq)]
11798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11800#[cfg_attr(feature = "ts", derive(TS))]
11801#[cfg_attr(feature = "ts", ts(export))]
11802pub struct ENCAPSULATED_DATA_DATA {
11803    #[doc = "sequence number (starting with 0 on every transmission)"]
11804    pub seqnr: u16,
11805    #[doc = "image data bytes"]
11806    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11807    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11808    pub data: [u8; 253],
11809}
11810impl ENCAPSULATED_DATA_DATA {
11811    pub const ENCODED_LEN: usize = 255usize;
11812    pub const DEFAULT: Self = Self {
11813        seqnr: 0_u16,
11814        data: [0_u8; 253usize],
11815    };
11816    #[cfg(feature = "arbitrary")]
11817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11818        use arbitrary::{Arbitrary, Unstructured};
11819        let mut buf = [0u8; 1024];
11820        rng.fill_bytes(&mut buf);
11821        let mut unstructured = Unstructured::new(&buf);
11822        Self::arbitrary(&mut unstructured).unwrap_or_default()
11823    }
11824}
11825impl Default for ENCAPSULATED_DATA_DATA {
11826    fn default() -> Self {
11827        Self::DEFAULT.clone()
11828    }
11829}
11830impl MessageData for ENCAPSULATED_DATA_DATA {
11831    type Message = MavMessage;
11832    const ID: u32 = 131u32;
11833    const NAME: &'static str = "ENCAPSULATED_DATA";
11834    const EXTRA_CRC: u8 = 223u8;
11835    const ENCODED_LEN: usize = 255usize;
11836    fn deser(
11837        _version: MavlinkVersion,
11838        __input: &[u8],
11839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11840        let avail_len = __input.len();
11841        let mut payload_buf = [0; Self::ENCODED_LEN];
11842        let mut buf = if avail_len < Self::ENCODED_LEN {
11843            payload_buf[0..avail_len].copy_from_slice(__input);
11844            Bytes::new(&payload_buf)
11845        } else {
11846            Bytes::new(__input)
11847        };
11848        let mut __struct = Self::default();
11849        __struct.seqnr = buf.get_u16_le();
11850        for v in &mut __struct.data {
11851            let val = buf.get_u8();
11852            *v = val;
11853        }
11854        Ok(__struct)
11855    }
11856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11857        let mut __tmp = BytesMut::new(bytes);
11858        #[allow(clippy::absurd_extreme_comparisons)]
11859        #[allow(unused_comparisons)]
11860        if __tmp.remaining() < Self::ENCODED_LEN {
11861            panic!(
11862                "buffer is too small (need {} bytes, but got {})",
11863                Self::ENCODED_LEN,
11864                __tmp.remaining(),
11865            )
11866        }
11867        __tmp.put_u16_le(self.seqnr);
11868        for val in &self.data {
11869            __tmp.put_u8(*val);
11870        }
11871        if matches!(version, MavlinkVersion::V2) {
11872            let len = __tmp.len();
11873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11874        } else {
11875            __tmp.len()
11876        }
11877    }
11878}
11879#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11880#[doc = ""]
11881#[doc = "ID: 290"]
11882#[derive(Debug, Clone, PartialEq)]
11883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11885#[cfg_attr(feature = "ts", derive(TS))]
11886#[cfg_attr(feature = "ts", ts(export))]
11887pub struct ESC_INFO_DATA {
11888    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11889    pub time_usec: u64,
11890    #[doc = "Number of reported errors by each ESC since boot."]
11891    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11892    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11893    pub error_count: [u32; 4],
11894    #[doc = "Counter of data packets received."]
11895    pub counter: u16,
11896    #[doc = "Bitmap of ESC failure flags."]
11897    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11898    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11899    pub failure_flags: [u16; 4],
11900    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11901    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11902    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11903    pub temperature: [i16; 4],
11904    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11905    pub index: u8,
11906    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11907    pub count: u8,
11908    #[doc = "Connection type protocol for all ESC."]
11909    pub connection_type: EscConnectionType,
11910    #[doc = "Information regarding online/offline status of each ESC."]
11911    pub info: u8,
11912}
11913impl ESC_INFO_DATA {
11914    pub const ENCODED_LEN: usize = 46usize;
11915    pub const DEFAULT: Self = Self {
11916        time_usec: 0_u64,
11917        error_count: [0_u32; 4usize],
11918        counter: 0_u16,
11919        failure_flags: [0_u16; 4usize],
11920        temperature: [0_i16; 4usize],
11921        index: 0_u8,
11922        count: 0_u8,
11923        connection_type: EscConnectionType::DEFAULT,
11924        info: 0_u8,
11925    };
11926    #[cfg(feature = "arbitrary")]
11927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11928        use arbitrary::{Arbitrary, Unstructured};
11929        let mut buf = [0u8; 1024];
11930        rng.fill_bytes(&mut buf);
11931        let mut unstructured = Unstructured::new(&buf);
11932        Self::arbitrary(&mut unstructured).unwrap_or_default()
11933    }
11934}
11935impl Default for ESC_INFO_DATA {
11936    fn default() -> Self {
11937        Self::DEFAULT.clone()
11938    }
11939}
11940impl MessageData for ESC_INFO_DATA {
11941    type Message = MavMessage;
11942    const ID: u32 = 290u32;
11943    const NAME: &'static str = "ESC_INFO";
11944    const EXTRA_CRC: u8 = 251u8;
11945    const ENCODED_LEN: usize = 46usize;
11946    fn deser(
11947        _version: MavlinkVersion,
11948        __input: &[u8],
11949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11950        let avail_len = __input.len();
11951        let mut payload_buf = [0; Self::ENCODED_LEN];
11952        let mut buf = if avail_len < Self::ENCODED_LEN {
11953            payload_buf[0..avail_len].copy_from_slice(__input);
11954            Bytes::new(&payload_buf)
11955        } else {
11956            Bytes::new(__input)
11957        };
11958        let mut __struct = Self::default();
11959        __struct.time_usec = buf.get_u64_le();
11960        for v in &mut __struct.error_count {
11961            let val = buf.get_u32_le();
11962            *v = val;
11963        }
11964        __struct.counter = buf.get_u16_le();
11965        for v in &mut __struct.failure_flags {
11966            let val = buf.get_u16_le();
11967            *v = val;
11968        }
11969        for v in &mut __struct.temperature {
11970            let val = buf.get_i16_le();
11971            *v = val;
11972        }
11973        __struct.index = buf.get_u8();
11974        __struct.count = buf.get_u8();
11975        let tmp = buf.get_u8();
11976        __struct.connection_type =
11977            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11978                enum_type: "EscConnectionType",
11979                value: tmp as u64,
11980            })?;
11981        __struct.info = buf.get_u8();
11982        Ok(__struct)
11983    }
11984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11985        let mut __tmp = BytesMut::new(bytes);
11986        #[allow(clippy::absurd_extreme_comparisons)]
11987        #[allow(unused_comparisons)]
11988        if __tmp.remaining() < Self::ENCODED_LEN {
11989            panic!(
11990                "buffer is too small (need {} bytes, but got {})",
11991                Self::ENCODED_LEN,
11992                __tmp.remaining(),
11993            )
11994        }
11995        __tmp.put_u64_le(self.time_usec);
11996        for val in &self.error_count {
11997            __tmp.put_u32_le(*val);
11998        }
11999        __tmp.put_u16_le(self.counter);
12000        for val in &self.failure_flags {
12001            __tmp.put_u16_le(*val);
12002        }
12003        for val in &self.temperature {
12004            __tmp.put_i16_le(*val);
12005        }
12006        __tmp.put_u8(self.index);
12007        __tmp.put_u8(self.count);
12008        __tmp.put_u8(self.connection_type as u8);
12009        __tmp.put_u8(self.info);
12010        if matches!(version, MavlinkVersion::V2) {
12011            let len = __tmp.len();
12012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12013        } else {
12014            __tmp.len()
12015        }
12016    }
12017}
12018#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
12019#[doc = ""]
12020#[doc = "ID: 291"]
12021#[derive(Debug, Clone, PartialEq)]
12022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12024#[cfg_attr(feature = "ts", derive(TS))]
12025#[cfg_attr(feature = "ts", ts(export))]
12026pub struct ESC_STATUS_DATA {
12027    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
12028    pub time_usec: u64,
12029    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
12030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12031    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12032    pub rpm: [i32; 4],
12033    #[doc = "Voltage measured from each ESC."]
12034    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12035    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12036    pub voltage: [f32; 4],
12037    #[doc = "Current measured from each ESC."]
12038    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12039    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12040    pub current: [f32; 4],
12041    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
12042    pub index: u8,
12043}
12044impl ESC_STATUS_DATA {
12045    pub const ENCODED_LEN: usize = 57usize;
12046    pub const DEFAULT: Self = Self {
12047        time_usec: 0_u64,
12048        rpm: [0_i32; 4usize],
12049        voltage: [0.0_f32; 4usize],
12050        current: [0.0_f32; 4usize],
12051        index: 0_u8,
12052    };
12053    #[cfg(feature = "arbitrary")]
12054    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12055        use arbitrary::{Arbitrary, Unstructured};
12056        let mut buf = [0u8; 1024];
12057        rng.fill_bytes(&mut buf);
12058        let mut unstructured = Unstructured::new(&buf);
12059        Self::arbitrary(&mut unstructured).unwrap_or_default()
12060    }
12061}
12062impl Default for ESC_STATUS_DATA {
12063    fn default() -> Self {
12064        Self::DEFAULT.clone()
12065    }
12066}
12067impl MessageData for ESC_STATUS_DATA {
12068    type Message = MavMessage;
12069    const ID: u32 = 291u32;
12070    const NAME: &'static str = "ESC_STATUS";
12071    const EXTRA_CRC: u8 = 10u8;
12072    const ENCODED_LEN: usize = 57usize;
12073    fn deser(
12074        _version: MavlinkVersion,
12075        __input: &[u8],
12076    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12077        let avail_len = __input.len();
12078        let mut payload_buf = [0; Self::ENCODED_LEN];
12079        let mut buf = if avail_len < Self::ENCODED_LEN {
12080            payload_buf[0..avail_len].copy_from_slice(__input);
12081            Bytes::new(&payload_buf)
12082        } else {
12083            Bytes::new(__input)
12084        };
12085        let mut __struct = Self::default();
12086        __struct.time_usec = buf.get_u64_le();
12087        for v in &mut __struct.rpm {
12088            let val = buf.get_i32_le();
12089            *v = val;
12090        }
12091        for v in &mut __struct.voltage {
12092            let val = buf.get_f32_le();
12093            *v = val;
12094        }
12095        for v in &mut __struct.current {
12096            let val = buf.get_f32_le();
12097            *v = val;
12098        }
12099        __struct.index = buf.get_u8();
12100        Ok(__struct)
12101    }
12102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12103        let mut __tmp = BytesMut::new(bytes);
12104        #[allow(clippy::absurd_extreme_comparisons)]
12105        #[allow(unused_comparisons)]
12106        if __tmp.remaining() < Self::ENCODED_LEN {
12107            panic!(
12108                "buffer is too small (need {} bytes, but got {})",
12109                Self::ENCODED_LEN,
12110                __tmp.remaining(),
12111            )
12112        }
12113        __tmp.put_u64_le(self.time_usec);
12114        for val in &self.rpm {
12115            __tmp.put_i32_le(*val);
12116        }
12117        for val in &self.voltage {
12118            __tmp.put_f32_le(*val);
12119        }
12120        for val in &self.current {
12121            __tmp.put_f32_le(*val);
12122        }
12123        __tmp.put_u8(self.index);
12124        if matches!(version, MavlinkVersion::V2) {
12125            let len = __tmp.len();
12126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12127        } else {
12128            __tmp.len()
12129        }
12130    }
12131}
12132#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
12133#[doc = ""]
12134#[doc = "ID: 230"]
12135#[derive(Debug, Clone, PartialEq)]
12136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12138#[cfg_attr(feature = "ts", derive(TS))]
12139#[cfg_attr(feature = "ts", ts(export))]
12140pub struct ESTIMATOR_STATUS_DATA {
12141    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12142    pub time_usec: u64,
12143    #[doc = "Velocity innovation test ratio"]
12144    pub vel_ratio: f32,
12145    #[doc = "Horizontal position innovation test ratio"]
12146    pub pos_horiz_ratio: f32,
12147    #[doc = "Vertical position innovation test ratio"]
12148    pub pos_vert_ratio: f32,
12149    #[doc = "Magnetometer innovation test ratio"]
12150    pub mag_ratio: f32,
12151    #[doc = "Height above terrain innovation test ratio"]
12152    pub hagl_ratio: f32,
12153    #[doc = "True airspeed innovation test ratio"]
12154    pub tas_ratio: f32,
12155    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
12156    pub pos_horiz_accuracy: f32,
12157    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
12158    pub pos_vert_accuracy: f32,
12159    #[doc = "Bitmap indicating which EKF outputs are valid."]
12160    pub flags: EstimatorStatusFlags,
12161}
12162impl ESTIMATOR_STATUS_DATA {
12163    pub const ENCODED_LEN: usize = 42usize;
12164    pub const DEFAULT: Self = Self {
12165        time_usec: 0_u64,
12166        vel_ratio: 0.0_f32,
12167        pos_horiz_ratio: 0.0_f32,
12168        pos_vert_ratio: 0.0_f32,
12169        mag_ratio: 0.0_f32,
12170        hagl_ratio: 0.0_f32,
12171        tas_ratio: 0.0_f32,
12172        pos_horiz_accuracy: 0.0_f32,
12173        pos_vert_accuracy: 0.0_f32,
12174        flags: EstimatorStatusFlags::DEFAULT,
12175    };
12176    #[cfg(feature = "arbitrary")]
12177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12178        use arbitrary::{Arbitrary, Unstructured};
12179        let mut buf = [0u8; 1024];
12180        rng.fill_bytes(&mut buf);
12181        let mut unstructured = Unstructured::new(&buf);
12182        Self::arbitrary(&mut unstructured).unwrap_or_default()
12183    }
12184}
12185impl Default for ESTIMATOR_STATUS_DATA {
12186    fn default() -> Self {
12187        Self::DEFAULT.clone()
12188    }
12189}
12190impl MessageData for ESTIMATOR_STATUS_DATA {
12191    type Message = MavMessage;
12192    const ID: u32 = 230u32;
12193    const NAME: &'static str = "ESTIMATOR_STATUS";
12194    const EXTRA_CRC: u8 = 163u8;
12195    const ENCODED_LEN: usize = 42usize;
12196    fn deser(
12197        _version: MavlinkVersion,
12198        __input: &[u8],
12199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12200        let avail_len = __input.len();
12201        let mut payload_buf = [0; Self::ENCODED_LEN];
12202        let mut buf = if avail_len < Self::ENCODED_LEN {
12203            payload_buf[0..avail_len].copy_from_slice(__input);
12204            Bytes::new(&payload_buf)
12205        } else {
12206            Bytes::new(__input)
12207        };
12208        let mut __struct = Self::default();
12209        __struct.time_usec = buf.get_u64_le();
12210        __struct.vel_ratio = buf.get_f32_le();
12211        __struct.pos_horiz_ratio = buf.get_f32_le();
12212        __struct.pos_vert_ratio = buf.get_f32_le();
12213        __struct.mag_ratio = buf.get_f32_le();
12214        __struct.hagl_ratio = buf.get_f32_le();
12215        __struct.tas_ratio = buf.get_f32_le();
12216        __struct.pos_horiz_accuracy = buf.get_f32_le();
12217        __struct.pos_vert_accuracy = buf.get_f32_le();
12218        let tmp = buf.get_u16_le();
12219        __struct.flags = EstimatorStatusFlags::from_bits(tmp).ok_or(
12220            ::mavlink_core::error::ParserError::InvalidFlag {
12221                flag_type: "EstimatorStatusFlags",
12222                value: tmp as u64,
12223            },
12224        )?;
12225        Ok(__struct)
12226    }
12227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12228        let mut __tmp = BytesMut::new(bytes);
12229        #[allow(clippy::absurd_extreme_comparisons)]
12230        #[allow(unused_comparisons)]
12231        if __tmp.remaining() < Self::ENCODED_LEN {
12232            panic!(
12233                "buffer is too small (need {} bytes, but got {})",
12234                Self::ENCODED_LEN,
12235                __tmp.remaining(),
12236            )
12237        }
12238        __tmp.put_u64_le(self.time_usec);
12239        __tmp.put_f32_le(self.vel_ratio);
12240        __tmp.put_f32_le(self.pos_horiz_ratio);
12241        __tmp.put_f32_le(self.pos_vert_ratio);
12242        __tmp.put_f32_le(self.mag_ratio);
12243        __tmp.put_f32_le(self.hagl_ratio);
12244        __tmp.put_f32_le(self.tas_ratio);
12245        __tmp.put_f32_le(self.pos_horiz_accuracy);
12246        __tmp.put_f32_le(self.pos_vert_accuracy);
12247        __tmp.put_u16_le(self.flags.bits());
12248        if matches!(version, MavlinkVersion::V2) {
12249            let len = __tmp.len();
12250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12251        } else {
12252            __tmp.len()
12253        }
12254    }
12255}
12256#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12257#[doc = ""]
12258#[doc = "ID: 410"]
12259#[derive(Debug, Clone, PartialEq)]
12260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12262#[cfg_attr(feature = "ts", derive(TS))]
12263#[cfg_attr(feature = "ts", ts(export))]
12264pub struct EVENT_DATA {
12265    #[doc = "Event ID (as defined in the component metadata)"]
12266    pub id: u32,
12267    #[doc = "Timestamp (time since system boot when the event happened)."]
12268    pub event_time_boot_ms: u32,
12269    #[doc = "Sequence number."]
12270    pub sequence: u16,
12271    #[doc = "Component ID"]
12272    pub destination_component: u8,
12273    #[doc = "System ID"]
12274    pub destination_system: u8,
12275    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12276    pub log_levels: u8,
12277    #[doc = "Arguments (depend on event ID)."]
12278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12280    pub arguments: [u8; 40],
12281}
12282impl EVENT_DATA {
12283    pub const ENCODED_LEN: usize = 53usize;
12284    pub const DEFAULT: Self = Self {
12285        id: 0_u32,
12286        event_time_boot_ms: 0_u32,
12287        sequence: 0_u16,
12288        destination_component: 0_u8,
12289        destination_system: 0_u8,
12290        log_levels: 0_u8,
12291        arguments: [0_u8; 40usize],
12292    };
12293    #[cfg(feature = "arbitrary")]
12294    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12295        use arbitrary::{Arbitrary, Unstructured};
12296        let mut buf = [0u8; 1024];
12297        rng.fill_bytes(&mut buf);
12298        let mut unstructured = Unstructured::new(&buf);
12299        Self::arbitrary(&mut unstructured).unwrap_or_default()
12300    }
12301}
12302impl Default for EVENT_DATA {
12303    fn default() -> Self {
12304        Self::DEFAULT.clone()
12305    }
12306}
12307impl MessageData for EVENT_DATA {
12308    type Message = MavMessage;
12309    const ID: u32 = 410u32;
12310    const NAME: &'static str = "EVENT";
12311    const EXTRA_CRC: u8 = 160u8;
12312    const ENCODED_LEN: usize = 53usize;
12313    fn deser(
12314        _version: MavlinkVersion,
12315        __input: &[u8],
12316    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12317        let avail_len = __input.len();
12318        let mut payload_buf = [0; Self::ENCODED_LEN];
12319        let mut buf = if avail_len < Self::ENCODED_LEN {
12320            payload_buf[0..avail_len].copy_from_slice(__input);
12321            Bytes::new(&payload_buf)
12322        } else {
12323            Bytes::new(__input)
12324        };
12325        let mut __struct = Self::default();
12326        __struct.id = buf.get_u32_le();
12327        __struct.event_time_boot_ms = buf.get_u32_le();
12328        __struct.sequence = buf.get_u16_le();
12329        __struct.destination_component = buf.get_u8();
12330        __struct.destination_system = buf.get_u8();
12331        __struct.log_levels = buf.get_u8();
12332        for v in &mut __struct.arguments {
12333            let val = buf.get_u8();
12334            *v = val;
12335        }
12336        Ok(__struct)
12337    }
12338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12339        let mut __tmp = BytesMut::new(bytes);
12340        #[allow(clippy::absurd_extreme_comparisons)]
12341        #[allow(unused_comparisons)]
12342        if __tmp.remaining() < Self::ENCODED_LEN {
12343            panic!(
12344                "buffer is too small (need {} bytes, but got {})",
12345                Self::ENCODED_LEN,
12346                __tmp.remaining(),
12347            )
12348        }
12349        __tmp.put_u32_le(self.id);
12350        __tmp.put_u32_le(self.event_time_boot_ms);
12351        __tmp.put_u16_le(self.sequence);
12352        __tmp.put_u8(self.destination_component);
12353        __tmp.put_u8(self.destination_system);
12354        __tmp.put_u8(self.log_levels);
12355        for val in &self.arguments {
12356            __tmp.put_u8(*val);
12357        }
12358        if matches!(version, MavlinkVersion::V2) {
12359            let len = __tmp.len();
12360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12361        } else {
12362            __tmp.len()
12363        }
12364    }
12365}
12366#[doc = "Provides state for additional features."]
12367#[doc = ""]
12368#[doc = "ID: 245"]
12369#[derive(Debug, Clone, PartialEq)]
12370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12372#[cfg_attr(feature = "ts", derive(TS))]
12373#[cfg_attr(feature = "ts", ts(export))]
12374pub struct EXTENDED_SYS_STATE_DATA {
12375    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12376    pub vtol_state: MavVtolState,
12377    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12378    pub landed_state: MavLandedState,
12379}
12380impl EXTENDED_SYS_STATE_DATA {
12381    pub const ENCODED_LEN: usize = 2usize;
12382    pub const DEFAULT: Self = Self {
12383        vtol_state: MavVtolState::DEFAULT,
12384        landed_state: MavLandedState::DEFAULT,
12385    };
12386    #[cfg(feature = "arbitrary")]
12387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12388        use arbitrary::{Arbitrary, Unstructured};
12389        let mut buf = [0u8; 1024];
12390        rng.fill_bytes(&mut buf);
12391        let mut unstructured = Unstructured::new(&buf);
12392        Self::arbitrary(&mut unstructured).unwrap_or_default()
12393    }
12394}
12395impl Default for EXTENDED_SYS_STATE_DATA {
12396    fn default() -> Self {
12397        Self::DEFAULT.clone()
12398    }
12399}
12400impl MessageData for EXTENDED_SYS_STATE_DATA {
12401    type Message = MavMessage;
12402    const ID: u32 = 245u32;
12403    const NAME: &'static str = "EXTENDED_SYS_STATE";
12404    const EXTRA_CRC: u8 = 130u8;
12405    const ENCODED_LEN: usize = 2usize;
12406    fn deser(
12407        _version: MavlinkVersion,
12408        __input: &[u8],
12409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12410        let avail_len = __input.len();
12411        let mut payload_buf = [0; Self::ENCODED_LEN];
12412        let mut buf = if avail_len < Self::ENCODED_LEN {
12413            payload_buf[0..avail_len].copy_from_slice(__input);
12414            Bytes::new(&payload_buf)
12415        } else {
12416            Bytes::new(__input)
12417        };
12418        let mut __struct = Self::default();
12419        let tmp = buf.get_u8();
12420        __struct.vtol_state =
12421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12422                enum_type: "MavVtolState",
12423                value: tmp as u64,
12424            })?;
12425        let tmp = buf.get_u8();
12426        __struct.landed_state =
12427            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12428                enum_type: "MavLandedState",
12429                value: tmp as u64,
12430            })?;
12431        Ok(__struct)
12432    }
12433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12434        let mut __tmp = BytesMut::new(bytes);
12435        #[allow(clippy::absurd_extreme_comparisons)]
12436        #[allow(unused_comparisons)]
12437        if __tmp.remaining() < Self::ENCODED_LEN {
12438            panic!(
12439                "buffer is too small (need {} bytes, but got {})",
12440                Self::ENCODED_LEN,
12441                __tmp.remaining(),
12442            )
12443        }
12444        __tmp.put_u8(self.vtol_state as u8);
12445        __tmp.put_u8(self.landed_state as u8);
12446        if matches!(version, MavlinkVersion::V2) {
12447            let len = __tmp.len();
12448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12449        } else {
12450            __tmp.len()
12451        }
12452    }
12453}
12454#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12455#[doc = ""]
12456#[doc = "ID: 162"]
12457#[derive(Debug, Clone, PartialEq)]
12458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12460#[cfg_attr(feature = "ts", derive(TS))]
12461#[cfg_attr(feature = "ts", ts(export))]
12462pub struct FENCE_STATUS_DATA {
12463    #[doc = "Time (since boot) of last breach."]
12464    pub breach_time: u32,
12465    #[doc = "Number of fence breaches."]
12466    pub breach_count: u16,
12467    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12468    pub breach_status: u8,
12469    #[doc = "Last breach type."]
12470    pub breach_type: FenceBreach,
12471    #[doc = "Active action to prevent fence breach"]
12472    #[cfg_attr(feature = "serde", serde(default))]
12473    pub breach_mitigation: FenceMitigate,
12474}
12475impl FENCE_STATUS_DATA {
12476    pub const ENCODED_LEN: usize = 9usize;
12477    pub const DEFAULT: Self = Self {
12478        breach_time: 0_u32,
12479        breach_count: 0_u16,
12480        breach_status: 0_u8,
12481        breach_type: FenceBreach::DEFAULT,
12482        breach_mitigation: FenceMitigate::DEFAULT,
12483    };
12484    #[cfg(feature = "arbitrary")]
12485    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12486        use arbitrary::{Arbitrary, Unstructured};
12487        let mut buf = [0u8; 1024];
12488        rng.fill_bytes(&mut buf);
12489        let mut unstructured = Unstructured::new(&buf);
12490        Self::arbitrary(&mut unstructured).unwrap_or_default()
12491    }
12492}
12493impl Default for FENCE_STATUS_DATA {
12494    fn default() -> Self {
12495        Self::DEFAULT.clone()
12496    }
12497}
12498impl MessageData for FENCE_STATUS_DATA {
12499    type Message = MavMessage;
12500    const ID: u32 = 162u32;
12501    const NAME: &'static str = "FENCE_STATUS";
12502    const EXTRA_CRC: u8 = 189u8;
12503    const ENCODED_LEN: usize = 9usize;
12504    fn deser(
12505        _version: MavlinkVersion,
12506        __input: &[u8],
12507    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12508        let avail_len = __input.len();
12509        let mut payload_buf = [0; Self::ENCODED_LEN];
12510        let mut buf = if avail_len < Self::ENCODED_LEN {
12511            payload_buf[0..avail_len].copy_from_slice(__input);
12512            Bytes::new(&payload_buf)
12513        } else {
12514            Bytes::new(__input)
12515        };
12516        let mut __struct = Self::default();
12517        __struct.breach_time = buf.get_u32_le();
12518        __struct.breach_count = buf.get_u16_le();
12519        __struct.breach_status = buf.get_u8();
12520        let tmp = buf.get_u8();
12521        __struct.breach_type =
12522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12523                enum_type: "FenceBreach",
12524                value: tmp as u64,
12525            })?;
12526        let tmp = buf.get_u8();
12527        __struct.breach_mitigation =
12528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12529                enum_type: "FenceMitigate",
12530                value: tmp as u64,
12531            })?;
12532        Ok(__struct)
12533    }
12534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12535        let mut __tmp = BytesMut::new(bytes);
12536        #[allow(clippy::absurd_extreme_comparisons)]
12537        #[allow(unused_comparisons)]
12538        if __tmp.remaining() < Self::ENCODED_LEN {
12539            panic!(
12540                "buffer is too small (need {} bytes, but got {})",
12541                Self::ENCODED_LEN,
12542                __tmp.remaining(),
12543            )
12544        }
12545        __tmp.put_u32_le(self.breach_time);
12546        __tmp.put_u16_le(self.breach_count);
12547        __tmp.put_u8(self.breach_status);
12548        __tmp.put_u8(self.breach_type as u8);
12549        if matches!(version, MavlinkVersion::V2) {
12550            __tmp.put_u8(self.breach_mitigation as u8);
12551            let len = __tmp.len();
12552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12553        } else {
12554            __tmp.len()
12555        }
12556    }
12557}
12558#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12559#[doc = ""]
12560#[doc = "ID: 110"]
12561#[derive(Debug, Clone, PartialEq)]
12562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12564#[cfg_attr(feature = "ts", derive(TS))]
12565#[cfg_attr(feature = "ts", ts(export))]
12566pub struct FILE_TRANSFER_PROTOCOL_DATA {
12567    #[doc = "Network ID (0 for broadcast)"]
12568    pub target_network: u8,
12569    #[doc = "System ID (0 for broadcast)"]
12570    pub target_system: u8,
12571    #[doc = "Component ID (0 for broadcast)"]
12572    pub target_component: u8,
12573    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12574    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12575    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12576    pub payload: [u8; 251],
12577}
12578impl FILE_TRANSFER_PROTOCOL_DATA {
12579    pub const ENCODED_LEN: usize = 254usize;
12580    pub const DEFAULT: Self = Self {
12581        target_network: 0_u8,
12582        target_system: 0_u8,
12583        target_component: 0_u8,
12584        payload: [0_u8; 251usize],
12585    };
12586    #[cfg(feature = "arbitrary")]
12587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12588        use arbitrary::{Arbitrary, Unstructured};
12589        let mut buf = [0u8; 1024];
12590        rng.fill_bytes(&mut buf);
12591        let mut unstructured = Unstructured::new(&buf);
12592        Self::arbitrary(&mut unstructured).unwrap_or_default()
12593    }
12594}
12595impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12596    fn default() -> Self {
12597        Self::DEFAULT.clone()
12598    }
12599}
12600impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12601    type Message = MavMessage;
12602    const ID: u32 = 110u32;
12603    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12604    const EXTRA_CRC: u8 = 84u8;
12605    const ENCODED_LEN: usize = 254usize;
12606    fn deser(
12607        _version: MavlinkVersion,
12608        __input: &[u8],
12609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12610        let avail_len = __input.len();
12611        let mut payload_buf = [0; Self::ENCODED_LEN];
12612        let mut buf = if avail_len < Self::ENCODED_LEN {
12613            payload_buf[0..avail_len].copy_from_slice(__input);
12614            Bytes::new(&payload_buf)
12615        } else {
12616            Bytes::new(__input)
12617        };
12618        let mut __struct = Self::default();
12619        __struct.target_network = buf.get_u8();
12620        __struct.target_system = buf.get_u8();
12621        __struct.target_component = buf.get_u8();
12622        for v in &mut __struct.payload {
12623            let val = buf.get_u8();
12624            *v = val;
12625        }
12626        Ok(__struct)
12627    }
12628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12629        let mut __tmp = BytesMut::new(bytes);
12630        #[allow(clippy::absurd_extreme_comparisons)]
12631        #[allow(unused_comparisons)]
12632        if __tmp.remaining() < Self::ENCODED_LEN {
12633            panic!(
12634                "buffer is too small (need {} bytes, but got {})",
12635                Self::ENCODED_LEN,
12636                __tmp.remaining(),
12637            )
12638        }
12639        __tmp.put_u8(self.target_network);
12640        __tmp.put_u8(self.target_system);
12641        __tmp.put_u8(self.target_component);
12642        for val in &self.payload {
12643            __tmp.put_u8(*val);
12644        }
12645        if matches!(version, MavlinkVersion::V2) {
12646            let len = __tmp.len();
12647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12648        } else {
12649            __tmp.len()
12650        }
12651    }
12652}
12653#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12654#[doc = ""]
12655#[doc = "ID: 264"]
12656#[derive(Debug, Clone, PartialEq)]
12657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12659#[cfg_attr(feature = "ts", derive(TS))]
12660#[cfg_attr(feature = "ts", ts(export))]
12661pub struct FLIGHT_INFORMATION_DATA {
12662    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12663    pub arming_time_utc: u64,
12664    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12665    pub takeoff_time_utc: u64,
12666    #[doc = "Flight number. Note, field is misnamed UUID."]
12667    pub flight_uuid: u64,
12668    #[doc = "Timestamp (time since system boot)."]
12669    pub time_boot_ms: u32,
12670    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12672    pub landing_time: u32,
12673}
12674impl FLIGHT_INFORMATION_DATA {
12675    pub const ENCODED_LEN: usize = 32usize;
12676    pub const DEFAULT: Self = Self {
12677        arming_time_utc: 0_u64,
12678        takeoff_time_utc: 0_u64,
12679        flight_uuid: 0_u64,
12680        time_boot_ms: 0_u32,
12681        landing_time: 0_u32,
12682    };
12683    #[cfg(feature = "arbitrary")]
12684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12685        use arbitrary::{Arbitrary, Unstructured};
12686        let mut buf = [0u8; 1024];
12687        rng.fill_bytes(&mut buf);
12688        let mut unstructured = Unstructured::new(&buf);
12689        Self::arbitrary(&mut unstructured).unwrap_or_default()
12690    }
12691}
12692impl Default for FLIGHT_INFORMATION_DATA {
12693    fn default() -> Self {
12694        Self::DEFAULT.clone()
12695    }
12696}
12697impl MessageData for FLIGHT_INFORMATION_DATA {
12698    type Message = MavMessage;
12699    const ID: u32 = 264u32;
12700    const NAME: &'static str = "FLIGHT_INFORMATION";
12701    const EXTRA_CRC: u8 = 49u8;
12702    const ENCODED_LEN: usize = 32usize;
12703    fn deser(
12704        _version: MavlinkVersion,
12705        __input: &[u8],
12706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12707        let avail_len = __input.len();
12708        let mut payload_buf = [0; Self::ENCODED_LEN];
12709        let mut buf = if avail_len < Self::ENCODED_LEN {
12710            payload_buf[0..avail_len].copy_from_slice(__input);
12711            Bytes::new(&payload_buf)
12712        } else {
12713            Bytes::new(__input)
12714        };
12715        let mut __struct = Self::default();
12716        __struct.arming_time_utc = buf.get_u64_le();
12717        __struct.takeoff_time_utc = buf.get_u64_le();
12718        __struct.flight_uuid = buf.get_u64_le();
12719        __struct.time_boot_ms = buf.get_u32_le();
12720        __struct.landing_time = buf.get_u32_le();
12721        Ok(__struct)
12722    }
12723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12724        let mut __tmp = BytesMut::new(bytes);
12725        #[allow(clippy::absurd_extreme_comparisons)]
12726        #[allow(unused_comparisons)]
12727        if __tmp.remaining() < Self::ENCODED_LEN {
12728            panic!(
12729                "buffer is too small (need {} bytes, but got {})",
12730                Self::ENCODED_LEN,
12731                __tmp.remaining(),
12732            )
12733        }
12734        __tmp.put_u64_le(self.arming_time_utc);
12735        __tmp.put_u64_le(self.takeoff_time_utc);
12736        __tmp.put_u64_le(self.flight_uuid);
12737        __tmp.put_u32_le(self.time_boot_ms);
12738        if matches!(version, MavlinkVersion::V2) {
12739            __tmp.put_u32_le(self.landing_time);
12740            let len = __tmp.len();
12741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12742        } else {
12743            __tmp.len()
12744        }
12745    }
12746}
12747#[doc = "Current motion information from a designated system."]
12748#[doc = ""]
12749#[doc = "ID: 144"]
12750#[derive(Debug, Clone, PartialEq)]
12751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12753#[cfg_attr(feature = "ts", derive(TS))]
12754#[cfg_attr(feature = "ts", ts(export))]
12755pub struct FOLLOW_TARGET_DATA {
12756    #[doc = "Timestamp (time since system boot)."]
12757    pub timestamp: u64,
12758    #[doc = "button states or switches of a tracker device"]
12759    pub custom_state: u64,
12760    #[doc = "Latitude (WGS84)"]
12761    pub lat: i32,
12762    #[doc = "Longitude (WGS84)"]
12763    pub lon: i32,
12764    #[doc = "Altitude (MSL)"]
12765    pub alt: f32,
12766    #[doc = "target velocity (0,0,0) for unknown"]
12767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12768    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12769    pub vel: [f32; 3],
12770    #[doc = "linear target acceleration (0,0,0) for unknown"]
12771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12773    pub acc: [f32; 3],
12774    #[doc = "(0 0 0 0 for unknown)"]
12775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12777    pub attitude_q: [f32; 4],
12778    #[doc = "(0 0 0 for unknown)"]
12779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12781    pub rates: [f32; 3],
12782    #[doc = "eph epv"]
12783    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12784    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12785    pub position_cov: [f32; 3],
12786    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12787    pub est_capabilities: u8,
12788}
12789impl FOLLOW_TARGET_DATA {
12790    pub const ENCODED_LEN: usize = 93usize;
12791    pub const DEFAULT: Self = Self {
12792        timestamp: 0_u64,
12793        custom_state: 0_u64,
12794        lat: 0_i32,
12795        lon: 0_i32,
12796        alt: 0.0_f32,
12797        vel: [0.0_f32; 3usize],
12798        acc: [0.0_f32; 3usize],
12799        attitude_q: [0.0_f32; 4usize],
12800        rates: [0.0_f32; 3usize],
12801        position_cov: [0.0_f32; 3usize],
12802        est_capabilities: 0_u8,
12803    };
12804    #[cfg(feature = "arbitrary")]
12805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12806        use arbitrary::{Arbitrary, Unstructured};
12807        let mut buf = [0u8; 1024];
12808        rng.fill_bytes(&mut buf);
12809        let mut unstructured = Unstructured::new(&buf);
12810        Self::arbitrary(&mut unstructured).unwrap_or_default()
12811    }
12812}
12813impl Default for FOLLOW_TARGET_DATA {
12814    fn default() -> Self {
12815        Self::DEFAULT.clone()
12816    }
12817}
12818impl MessageData for FOLLOW_TARGET_DATA {
12819    type Message = MavMessage;
12820    const ID: u32 = 144u32;
12821    const NAME: &'static str = "FOLLOW_TARGET";
12822    const EXTRA_CRC: u8 = 127u8;
12823    const ENCODED_LEN: usize = 93usize;
12824    fn deser(
12825        _version: MavlinkVersion,
12826        __input: &[u8],
12827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12828        let avail_len = __input.len();
12829        let mut payload_buf = [0; Self::ENCODED_LEN];
12830        let mut buf = if avail_len < Self::ENCODED_LEN {
12831            payload_buf[0..avail_len].copy_from_slice(__input);
12832            Bytes::new(&payload_buf)
12833        } else {
12834            Bytes::new(__input)
12835        };
12836        let mut __struct = Self::default();
12837        __struct.timestamp = buf.get_u64_le();
12838        __struct.custom_state = buf.get_u64_le();
12839        __struct.lat = buf.get_i32_le();
12840        __struct.lon = buf.get_i32_le();
12841        __struct.alt = buf.get_f32_le();
12842        for v in &mut __struct.vel {
12843            let val = buf.get_f32_le();
12844            *v = val;
12845        }
12846        for v in &mut __struct.acc {
12847            let val = buf.get_f32_le();
12848            *v = val;
12849        }
12850        for v in &mut __struct.attitude_q {
12851            let val = buf.get_f32_le();
12852            *v = val;
12853        }
12854        for v in &mut __struct.rates {
12855            let val = buf.get_f32_le();
12856            *v = val;
12857        }
12858        for v in &mut __struct.position_cov {
12859            let val = buf.get_f32_le();
12860            *v = val;
12861        }
12862        __struct.est_capabilities = buf.get_u8();
12863        Ok(__struct)
12864    }
12865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12866        let mut __tmp = BytesMut::new(bytes);
12867        #[allow(clippy::absurd_extreme_comparisons)]
12868        #[allow(unused_comparisons)]
12869        if __tmp.remaining() < Self::ENCODED_LEN {
12870            panic!(
12871                "buffer is too small (need {} bytes, but got {})",
12872                Self::ENCODED_LEN,
12873                __tmp.remaining(),
12874            )
12875        }
12876        __tmp.put_u64_le(self.timestamp);
12877        __tmp.put_u64_le(self.custom_state);
12878        __tmp.put_i32_le(self.lat);
12879        __tmp.put_i32_le(self.lon);
12880        __tmp.put_f32_le(self.alt);
12881        for val in &self.vel {
12882            __tmp.put_f32_le(*val);
12883        }
12884        for val in &self.acc {
12885            __tmp.put_f32_le(*val);
12886        }
12887        for val in &self.attitude_q {
12888            __tmp.put_f32_le(*val);
12889        }
12890        for val in &self.rates {
12891            __tmp.put_f32_le(*val);
12892        }
12893        for val in &self.position_cov {
12894            __tmp.put_f32_le(*val);
12895        }
12896        __tmp.put_u8(self.est_capabilities);
12897        if matches!(version, MavlinkVersion::V2) {
12898            let len = __tmp.len();
12899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12900        } else {
12901            __tmp.len()
12902        }
12903    }
12904}
12905#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12906#[doc = ""]
12907#[doc = "ID: 371"]
12908#[derive(Debug, Clone, PartialEq)]
12909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12911#[cfg_attr(feature = "ts", derive(TS))]
12912#[cfg_attr(feature = "ts", ts(export))]
12913pub struct FUEL_STATUS_DATA {
12914    #[doc = "Capacity when full. Must be provided."]
12915    pub maximum_fuel: f32,
12916    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12917    pub consumed_fuel: f32,
12918    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12919    pub remaining_fuel: f32,
12920    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12921    pub flow_rate: f32,
12922    #[doc = "Fuel temperature. NaN: field not provided."]
12923    pub temperature: f32,
12924    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12925    pub fuel_type: MavFuelType,
12926    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12927    pub id: u8,
12928    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12929    pub percent_remaining: u8,
12930}
12931impl FUEL_STATUS_DATA {
12932    pub const ENCODED_LEN: usize = 26usize;
12933    pub const DEFAULT: Self = Self {
12934        maximum_fuel: 0.0_f32,
12935        consumed_fuel: 0.0_f32,
12936        remaining_fuel: 0.0_f32,
12937        flow_rate: 0.0_f32,
12938        temperature: 0.0_f32,
12939        fuel_type: MavFuelType::DEFAULT,
12940        id: 0_u8,
12941        percent_remaining: 0_u8,
12942    };
12943    #[cfg(feature = "arbitrary")]
12944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12945        use arbitrary::{Arbitrary, Unstructured};
12946        let mut buf = [0u8; 1024];
12947        rng.fill_bytes(&mut buf);
12948        let mut unstructured = Unstructured::new(&buf);
12949        Self::arbitrary(&mut unstructured).unwrap_or_default()
12950    }
12951}
12952impl Default for FUEL_STATUS_DATA {
12953    fn default() -> Self {
12954        Self::DEFAULT.clone()
12955    }
12956}
12957impl MessageData for FUEL_STATUS_DATA {
12958    type Message = MavMessage;
12959    const ID: u32 = 371u32;
12960    const NAME: &'static str = "FUEL_STATUS";
12961    const EXTRA_CRC: u8 = 10u8;
12962    const ENCODED_LEN: usize = 26usize;
12963    fn deser(
12964        _version: MavlinkVersion,
12965        __input: &[u8],
12966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12967        let avail_len = __input.len();
12968        let mut payload_buf = [0; Self::ENCODED_LEN];
12969        let mut buf = if avail_len < Self::ENCODED_LEN {
12970            payload_buf[0..avail_len].copy_from_slice(__input);
12971            Bytes::new(&payload_buf)
12972        } else {
12973            Bytes::new(__input)
12974        };
12975        let mut __struct = Self::default();
12976        __struct.maximum_fuel = buf.get_f32_le();
12977        __struct.consumed_fuel = buf.get_f32_le();
12978        __struct.remaining_fuel = buf.get_f32_le();
12979        __struct.flow_rate = buf.get_f32_le();
12980        __struct.temperature = buf.get_f32_le();
12981        let tmp = buf.get_u32_le();
12982        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12983            ::mavlink_core::error::ParserError::InvalidEnum {
12984                enum_type: "MavFuelType",
12985                value: tmp as u64,
12986            },
12987        )?;
12988        __struct.id = buf.get_u8();
12989        __struct.percent_remaining = buf.get_u8();
12990        Ok(__struct)
12991    }
12992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12993        let mut __tmp = BytesMut::new(bytes);
12994        #[allow(clippy::absurd_extreme_comparisons)]
12995        #[allow(unused_comparisons)]
12996        if __tmp.remaining() < Self::ENCODED_LEN {
12997            panic!(
12998                "buffer is too small (need {} bytes, but got {})",
12999                Self::ENCODED_LEN,
13000                __tmp.remaining(),
13001            )
13002        }
13003        __tmp.put_f32_le(self.maximum_fuel);
13004        __tmp.put_f32_le(self.consumed_fuel);
13005        __tmp.put_f32_le(self.remaining_fuel);
13006        __tmp.put_f32_le(self.flow_rate);
13007        __tmp.put_f32_le(self.temperature);
13008        __tmp.put_u32_le(self.fuel_type as u32);
13009        __tmp.put_u8(self.id);
13010        __tmp.put_u8(self.percent_remaining);
13011        if matches!(version, MavlinkVersion::V2) {
13012            let len = __tmp.len();
13013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13014        } else {
13015            __tmp.len()
13016        }
13017    }
13018}
13019#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13020#[doc = ""]
13021#[doc = "ID: 373"]
13022#[derive(Debug, Clone, PartialEq)]
13023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13025#[cfg_attr(feature = "ts", derive(TS))]
13026#[cfg_attr(feature = "ts", ts(export))]
13027pub struct GENERATOR_STATUS_DATA {
13028    #[doc = "Status flags."]
13029    pub status: MavGeneratorStatusFlag,
13030    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13031    pub battery_current: f32,
13032    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13033    pub load_current: f32,
13034    #[doc = "The power being generated. NaN: field not provided"]
13035    pub power_generated: f32,
13036    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13037    pub bus_voltage: f32,
13038    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13039    pub bat_current_setpoint: f32,
13040    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13041    pub runtime: u32,
13042    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13043    pub time_until_maintenance: i32,
13044    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13045    pub generator_speed: u16,
13046    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13047    pub rectifier_temperature: i16,
13048    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13049    pub generator_temperature: i16,
13050}
13051impl GENERATOR_STATUS_DATA {
13052    pub const ENCODED_LEN: usize = 42usize;
13053    pub const DEFAULT: Self = Self {
13054        status: MavGeneratorStatusFlag::DEFAULT,
13055        battery_current: 0.0_f32,
13056        load_current: 0.0_f32,
13057        power_generated: 0.0_f32,
13058        bus_voltage: 0.0_f32,
13059        bat_current_setpoint: 0.0_f32,
13060        runtime: 0_u32,
13061        time_until_maintenance: 0_i32,
13062        generator_speed: 0_u16,
13063        rectifier_temperature: 0_i16,
13064        generator_temperature: 0_i16,
13065    };
13066    #[cfg(feature = "arbitrary")]
13067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13068        use arbitrary::{Arbitrary, Unstructured};
13069        let mut buf = [0u8; 1024];
13070        rng.fill_bytes(&mut buf);
13071        let mut unstructured = Unstructured::new(&buf);
13072        Self::arbitrary(&mut unstructured).unwrap_or_default()
13073    }
13074}
13075impl Default for GENERATOR_STATUS_DATA {
13076    fn default() -> Self {
13077        Self::DEFAULT.clone()
13078    }
13079}
13080impl MessageData for GENERATOR_STATUS_DATA {
13081    type Message = MavMessage;
13082    const ID: u32 = 373u32;
13083    const NAME: &'static str = "GENERATOR_STATUS";
13084    const EXTRA_CRC: u8 = 117u8;
13085    const ENCODED_LEN: usize = 42usize;
13086    fn deser(
13087        _version: MavlinkVersion,
13088        __input: &[u8],
13089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13090        let avail_len = __input.len();
13091        let mut payload_buf = [0; Self::ENCODED_LEN];
13092        let mut buf = if avail_len < Self::ENCODED_LEN {
13093            payload_buf[0..avail_len].copy_from_slice(__input);
13094            Bytes::new(&payload_buf)
13095        } else {
13096            Bytes::new(__input)
13097        };
13098        let mut __struct = Self::default();
13099        let tmp = buf.get_u64_le();
13100        __struct.status = MavGeneratorStatusFlag::from_bits(tmp).ok_or(
13101            ::mavlink_core::error::ParserError::InvalidFlag {
13102                flag_type: "MavGeneratorStatusFlag",
13103                value: tmp as u64,
13104            },
13105        )?;
13106        __struct.battery_current = buf.get_f32_le();
13107        __struct.load_current = buf.get_f32_le();
13108        __struct.power_generated = buf.get_f32_le();
13109        __struct.bus_voltage = buf.get_f32_le();
13110        __struct.bat_current_setpoint = buf.get_f32_le();
13111        __struct.runtime = buf.get_u32_le();
13112        __struct.time_until_maintenance = buf.get_i32_le();
13113        __struct.generator_speed = buf.get_u16_le();
13114        __struct.rectifier_temperature = buf.get_i16_le();
13115        __struct.generator_temperature = buf.get_i16_le();
13116        Ok(__struct)
13117    }
13118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13119        let mut __tmp = BytesMut::new(bytes);
13120        #[allow(clippy::absurd_extreme_comparisons)]
13121        #[allow(unused_comparisons)]
13122        if __tmp.remaining() < Self::ENCODED_LEN {
13123            panic!(
13124                "buffer is too small (need {} bytes, but got {})",
13125                Self::ENCODED_LEN,
13126                __tmp.remaining(),
13127            )
13128        }
13129        __tmp.put_u64_le(self.status.bits());
13130        __tmp.put_f32_le(self.battery_current);
13131        __tmp.put_f32_le(self.load_current);
13132        __tmp.put_f32_le(self.power_generated);
13133        __tmp.put_f32_le(self.bus_voltage);
13134        __tmp.put_f32_le(self.bat_current_setpoint);
13135        __tmp.put_u32_le(self.runtime);
13136        __tmp.put_i32_le(self.time_until_maintenance);
13137        __tmp.put_u16_le(self.generator_speed);
13138        __tmp.put_i16_le(self.rectifier_temperature);
13139        __tmp.put_i16_le(self.generator_temperature);
13140        if matches!(version, MavlinkVersion::V2) {
13141            let len = __tmp.len();
13142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13143        } else {
13144            __tmp.len()
13145        }
13146    }
13147}
13148#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13149#[doc = ""]
13150#[doc = "ID: 285"]
13151#[derive(Debug, Clone, PartialEq)]
13152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13154#[cfg_attr(feature = "ts", derive(TS))]
13155#[cfg_attr(feature = "ts", ts(export))]
13156pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13157    #[doc = "Timestamp (time since system boot)."]
13158    pub time_boot_ms: u32,
13159    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13162    pub q: [f32; 4],
13163    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13164    pub angular_velocity_x: f32,
13165    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13166    pub angular_velocity_y: f32,
13167    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13168    pub angular_velocity_z: f32,
13169    #[doc = "Failure flags (0 for no failure)"]
13170    pub failure_flags: GimbalDeviceErrorFlags,
13171    #[doc = "Current gimbal flags set."]
13172    pub flags: GimbalDeviceFlags,
13173    #[doc = "System ID"]
13174    pub target_system: u8,
13175    #[doc = "Component ID"]
13176    pub target_component: u8,
13177    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13179    pub delta_yaw: f32,
13180    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13181    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13182    pub delta_yaw_velocity: f32,
13183    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13185    pub gimbal_device_id: u8,
13186}
13187impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13188    pub const ENCODED_LEN: usize = 49usize;
13189    pub const DEFAULT: Self = Self {
13190        time_boot_ms: 0_u32,
13191        q: [0.0_f32; 4usize],
13192        angular_velocity_x: 0.0_f32,
13193        angular_velocity_y: 0.0_f32,
13194        angular_velocity_z: 0.0_f32,
13195        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13196        flags: GimbalDeviceFlags::DEFAULT,
13197        target_system: 0_u8,
13198        target_component: 0_u8,
13199        delta_yaw: 0.0_f32,
13200        delta_yaw_velocity: 0.0_f32,
13201        gimbal_device_id: 0_u8,
13202    };
13203    #[cfg(feature = "arbitrary")]
13204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13205        use arbitrary::{Arbitrary, Unstructured};
13206        let mut buf = [0u8; 1024];
13207        rng.fill_bytes(&mut buf);
13208        let mut unstructured = Unstructured::new(&buf);
13209        Self::arbitrary(&mut unstructured).unwrap_or_default()
13210    }
13211}
13212impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13213    fn default() -> Self {
13214        Self::DEFAULT.clone()
13215    }
13216}
13217impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13218    type Message = MavMessage;
13219    const ID: u32 = 285u32;
13220    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13221    const EXTRA_CRC: u8 = 137u8;
13222    const ENCODED_LEN: usize = 49usize;
13223    fn deser(
13224        _version: MavlinkVersion,
13225        __input: &[u8],
13226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13227        let avail_len = __input.len();
13228        let mut payload_buf = [0; Self::ENCODED_LEN];
13229        let mut buf = if avail_len < Self::ENCODED_LEN {
13230            payload_buf[0..avail_len].copy_from_slice(__input);
13231            Bytes::new(&payload_buf)
13232        } else {
13233            Bytes::new(__input)
13234        };
13235        let mut __struct = Self::default();
13236        __struct.time_boot_ms = buf.get_u32_le();
13237        for v in &mut __struct.q {
13238            let val = buf.get_f32_le();
13239            *v = val;
13240        }
13241        __struct.angular_velocity_x = buf.get_f32_le();
13242        __struct.angular_velocity_y = buf.get_f32_le();
13243        __struct.angular_velocity_z = buf.get_f32_le();
13244        let tmp = buf.get_u32_le();
13245        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(tmp).ok_or(
13246            ::mavlink_core::error::ParserError::InvalidFlag {
13247                flag_type: "GimbalDeviceErrorFlags",
13248                value: tmp as u64,
13249            },
13250        )?;
13251        let tmp = buf.get_u16_le();
13252        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
13253            ::mavlink_core::error::ParserError::InvalidFlag {
13254                flag_type: "GimbalDeviceFlags",
13255                value: tmp as u64,
13256            },
13257        )?;
13258        __struct.target_system = buf.get_u8();
13259        __struct.target_component = buf.get_u8();
13260        __struct.delta_yaw = buf.get_f32_le();
13261        __struct.delta_yaw_velocity = buf.get_f32_le();
13262        __struct.gimbal_device_id = buf.get_u8();
13263        Ok(__struct)
13264    }
13265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13266        let mut __tmp = BytesMut::new(bytes);
13267        #[allow(clippy::absurd_extreme_comparisons)]
13268        #[allow(unused_comparisons)]
13269        if __tmp.remaining() < Self::ENCODED_LEN {
13270            panic!(
13271                "buffer is too small (need {} bytes, but got {})",
13272                Self::ENCODED_LEN,
13273                __tmp.remaining(),
13274            )
13275        }
13276        __tmp.put_u32_le(self.time_boot_ms);
13277        for val in &self.q {
13278            __tmp.put_f32_le(*val);
13279        }
13280        __tmp.put_f32_le(self.angular_velocity_x);
13281        __tmp.put_f32_le(self.angular_velocity_y);
13282        __tmp.put_f32_le(self.angular_velocity_z);
13283        __tmp.put_u32_le(self.failure_flags.bits());
13284        __tmp.put_u16_le(self.flags.bits());
13285        __tmp.put_u8(self.target_system);
13286        __tmp.put_u8(self.target_component);
13287        if matches!(version, MavlinkVersion::V2) {
13288            __tmp.put_f32_le(self.delta_yaw);
13289            __tmp.put_f32_le(self.delta_yaw_velocity);
13290            __tmp.put_u8(self.gimbal_device_id);
13291            let len = __tmp.len();
13292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13293        } else {
13294            __tmp.len()
13295        }
13296    }
13297}
13298#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13299#[doc = ""]
13300#[doc = "ID: 283"]
13301#[derive(Debug, Clone, PartialEq)]
13302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13304#[cfg_attr(feature = "ts", derive(TS))]
13305#[cfg_attr(feature = "ts", ts(export))]
13306pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13307    #[doc = "UID of gimbal hardware (0 if unknown)."]
13308    pub uid: u64,
13309    #[doc = "Timestamp (time since system boot)."]
13310    pub time_boot_ms: u32,
13311    #[doc = "0xff)."]
13312    pub firmware_version: u32,
13313    #[doc = "0xff)."]
13314    pub hardware_version: u32,
13315    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13316    pub roll_min: f32,
13317    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13318    pub roll_max: f32,
13319    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13320    pub pitch_min: f32,
13321    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13322    pub pitch_max: f32,
13323    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13324    pub yaw_min: f32,
13325    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13326    pub yaw_max: f32,
13327    #[doc = "Bitmap of gimbal capability flags."]
13328    pub cap_flags: GimbalDeviceCapFlags,
13329    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13330    pub custom_cap_flags: u16,
13331    #[doc = "Name of the gimbal vendor."]
13332    #[cfg_attr(feature = "ts", ts(type = "string"))]
13333    pub vendor_name: CharArray<32>,
13334    #[doc = "Name of the gimbal model."]
13335    #[cfg_attr(feature = "ts", ts(type = "string"))]
13336    pub model_name: CharArray<32>,
13337    #[doc = "Custom name of the gimbal given to it by the user."]
13338    #[cfg_attr(feature = "ts", ts(type = "string"))]
13339    pub custom_name: CharArray<32>,
13340    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13341    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13342    pub gimbal_device_id: u8,
13343}
13344impl GIMBAL_DEVICE_INFORMATION_DATA {
13345    pub const ENCODED_LEN: usize = 145usize;
13346    pub const DEFAULT: Self = Self {
13347        uid: 0_u64,
13348        time_boot_ms: 0_u32,
13349        firmware_version: 0_u32,
13350        hardware_version: 0_u32,
13351        roll_min: 0.0_f32,
13352        roll_max: 0.0_f32,
13353        pitch_min: 0.0_f32,
13354        pitch_max: 0.0_f32,
13355        yaw_min: 0.0_f32,
13356        yaw_max: 0.0_f32,
13357        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13358        custom_cap_flags: 0_u16,
13359        vendor_name: CharArray::new([0_u8; 32usize]),
13360        model_name: CharArray::new([0_u8; 32usize]),
13361        custom_name: CharArray::new([0_u8; 32usize]),
13362        gimbal_device_id: 0_u8,
13363    };
13364    #[cfg(feature = "arbitrary")]
13365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13366        use arbitrary::{Arbitrary, Unstructured};
13367        let mut buf = [0u8; 1024];
13368        rng.fill_bytes(&mut buf);
13369        let mut unstructured = Unstructured::new(&buf);
13370        Self::arbitrary(&mut unstructured).unwrap_or_default()
13371    }
13372}
13373impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13374    fn default() -> Self {
13375        Self::DEFAULT.clone()
13376    }
13377}
13378impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13379    type Message = MavMessage;
13380    const ID: u32 = 283u32;
13381    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13382    const EXTRA_CRC: u8 = 74u8;
13383    const ENCODED_LEN: usize = 145usize;
13384    fn deser(
13385        _version: MavlinkVersion,
13386        __input: &[u8],
13387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13388        let avail_len = __input.len();
13389        let mut payload_buf = [0; Self::ENCODED_LEN];
13390        let mut buf = if avail_len < Self::ENCODED_LEN {
13391            payload_buf[0..avail_len].copy_from_slice(__input);
13392            Bytes::new(&payload_buf)
13393        } else {
13394            Bytes::new(__input)
13395        };
13396        let mut __struct = Self::default();
13397        __struct.uid = buf.get_u64_le();
13398        __struct.time_boot_ms = buf.get_u32_le();
13399        __struct.firmware_version = buf.get_u32_le();
13400        __struct.hardware_version = buf.get_u32_le();
13401        __struct.roll_min = buf.get_f32_le();
13402        __struct.roll_max = buf.get_f32_le();
13403        __struct.pitch_min = buf.get_f32_le();
13404        __struct.pitch_max = buf.get_f32_le();
13405        __struct.yaw_min = buf.get_f32_le();
13406        __struct.yaw_max = buf.get_f32_le();
13407        let tmp = buf.get_u16_le();
13408        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(tmp).ok_or(
13409            ::mavlink_core::error::ParserError::InvalidFlag {
13410                flag_type: "GimbalDeviceCapFlags",
13411                value: tmp as u64,
13412            },
13413        )?;
13414        __struct.custom_cap_flags = buf.get_u16_le();
13415        let mut tmp = [0_u8; 32usize];
13416        for v in &mut tmp {
13417            *v = buf.get_u8();
13418        }
13419        __struct.vendor_name = CharArray::new(tmp);
13420        let mut tmp = [0_u8; 32usize];
13421        for v in &mut tmp {
13422            *v = buf.get_u8();
13423        }
13424        __struct.model_name = CharArray::new(tmp);
13425        let mut tmp = [0_u8; 32usize];
13426        for v in &mut tmp {
13427            *v = buf.get_u8();
13428        }
13429        __struct.custom_name = CharArray::new(tmp);
13430        __struct.gimbal_device_id = buf.get_u8();
13431        Ok(__struct)
13432    }
13433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13434        let mut __tmp = BytesMut::new(bytes);
13435        #[allow(clippy::absurd_extreme_comparisons)]
13436        #[allow(unused_comparisons)]
13437        if __tmp.remaining() < Self::ENCODED_LEN {
13438            panic!(
13439                "buffer is too small (need {} bytes, but got {})",
13440                Self::ENCODED_LEN,
13441                __tmp.remaining(),
13442            )
13443        }
13444        __tmp.put_u64_le(self.uid);
13445        __tmp.put_u32_le(self.time_boot_ms);
13446        __tmp.put_u32_le(self.firmware_version);
13447        __tmp.put_u32_le(self.hardware_version);
13448        __tmp.put_f32_le(self.roll_min);
13449        __tmp.put_f32_le(self.roll_max);
13450        __tmp.put_f32_le(self.pitch_min);
13451        __tmp.put_f32_le(self.pitch_max);
13452        __tmp.put_f32_le(self.yaw_min);
13453        __tmp.put_f32_le(self.yaw_max);
13454        __tmp.put_u16_le(self.cap_flags.bits());
13455        __tmp.put_u16_le(self.custom_cap_flags);
13456        for val in &self.vendor_name {
13457            __tmp.put_u8(*val);
13458        }
13459        for val in &self.model_name {
13460            __tmp.put_u8(*val);
13461        }
13462        for val in &self.custom_name {
13463            __tmp.put_u8(*val);
13464        }
13465        if matches!(version, MavlinkVersion::V2) {
13466            __tmp.put_u8(self.gimbal_device_id);
13467            let len = __tmp.len();
13468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13469        } else {
13470            __tmp.len()
13471        }
13472    }
13473}
13474#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13475#[doc = ""]
13476#[doc = "ID: 284"]
13477#[derive(Debug, Clone, PartialEq)]
13478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13480#[cfg_attr(feature = "ts", derive(TS))]
13481#[cfg_attr(feature = "ts", ts(export))]
13482pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13483    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13486    pub q: [f32; 4],
13487    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13488    pub angular_velocity_x: f32,
13489    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13490    pub angular_velocity_y: f32,
13491    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13492    pub angular_velocity_z: f32,
13493    #[doc = "Low level gimbal flags."]
13494    pub flags: GimbalDeviceFlags,
13495    #[doc = "System ID"]
13496    pub target_system: u8,
13497    #[doc = "Component ID"]
13498    pub target_component: u8,
13499}
13500impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13501    pub const ENCODED_LEN: usize = 32usize;
13502    pub const DEFAULT: Self = Self {
13503        q: [0.0_f32; 4usize],
13504        angular_velocity_x: 0.0_f32,
13505        angular_velocity_y: 0.0_f32,
13506        angular_velocity_z: 0.0_f32,
13507        flags: GimbalDeviceFlags::DEFAULT,
13508        target_system: 0_u8,
13509        target_component: 0_u8,
13510    };
13511    #[cfg(feature = "arbitrary")]
13512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13513        use arbitrary::{Arbitrary, Unstructured};
13514        let mut buf = [0u8; 1024];
13515        rng.fill_bytes(&mut buf);
13516        let mut unstructured = Unstructured::new(&buf);
13517        Self::arbitrary(&mut unstructured).unwrap_or_default()
13518    }
13519}
13520impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13521    fn default() -> Self {
13522        Self::DEFAULT.clone()
13523    }
13524}
13525impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13526    type Message = MavMessage;
13527    const ID: u32 = 284u32;
13528    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13529    const EXTRA_CRC: u8 = 99u8;
13530    const ENCODED_LEN: usize = 32usize;
13531    fn deser(
13532        _version: MavlinkVersion,
13533        __input: &[u8],
13534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13535        let avail_len = __input.len();
13536        let mut payload_buf = [0; Self::ENCODED_LEN];
13537        let mut buf = if avail_len < Self::ENCODED_LEN {
13538            payload_buf[0..avail_len].copy_from_slice(__input);
13539            Bytes::new(&payload_buf)
13540        } else {
13541            Bytes::new(__input)
13542        };
13543        let mut __struct = Self::default();
13544        for v in &mut __struct.q {
13545            let val = buf.get_f32_le();
13546            *v = val;
13547        }
13548        __struct.angular_velocity_x = buf.get_f32_le();
13549        __struct.angular_velocity_y = buf.get_f32_le();
13550        __struct.angular_velocity_z = buf.get_f32_le();
13551        let tmp = buf.get_u16_le();
13552        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
13553            ::mavlink_core::error::ParserError::InvalidFlag {
13554                flag_type: "GimbalDeviceFlags",
13555                value: tmp as u64,
13556            },
13557        )?;
13558        __struct.target_system = buf.get_u8();
13559        __struct.target_component = buf.get_u8();
13560        Ok(__struct)
13561    }
13562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13563        let mut __tmp = BytesMut::new(bytes);
13564        #[allow(clippy::absurd_extreme_comparisons)]
13565        #[allow(unused_comparisons)]
13566        if __tmp.remaining() < Self::ENCODED_LEN {
13567            panic!(
13568                "buffer is too small (need {} bytes, but got {})",
13569                Self::ENCODED_LEN,
13570                __tmp.remaining(),
13571            )
13572        }
13573        for val in &self.q {
13574            __tmp.put_f32_le(*val);
13575        }
13576        __tmp.put_f32_le(self.angular_velocity_x);
13577        __tmp.put_f32_le(self.angular_velocity_y);
13578        __tmp.put_f32_le(self.angular_velocity_z);
13579        __tmp.put_u16_le(self.flags.bits());
13580        __tmp.put_u8(self.target_system);
13581        __tmp.put_u8(self.target_component);
13582        if matches!(version, MavlinkVersion::V2) {
13583            let len = __tmp.len();
13584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13585        } else {
13586            __tmp.len()
13587        }
13588    }
13589}
13590#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13591#[doc = ""]
13592#[doc = "ID: 280"]
13593#[derive(Debug, Clone, PartialEq)]
13594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13596#[cfg_attr(feature = "ts", derive(TS))]
13597#[cfg_attr(feature = "ts", ts(export))]
13598pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13599    #[doc = "Timestamp (time since system boot)."]
13600    pub time_boot_ms: u32,
13601    #[doc = "Bitmap of gimbal capability flags."]
13602    pub cap_flags: GimbalManagerCapFlags,
13603    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13604    pub roll_min: f32,
13605    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13606    pub roll_max: f32,
13607    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13608    pub pitch_min: f32,
13609    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13610    pub pitch_max: f32,
13611    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13612    pub yaw_min: f32,
13613    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13614    pub yaw_max: f32,
13615    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13616    pub gimbal_device_id: u8,
13617}
13618impl GIMBAL_MANAGER_INFORMATION_DATA {
13619    pub const ENCODED_LEN: usize = 33usize;
13620    pub const DEFAULT: Self = Self {
13621        time_boot_ms: 0_u32,
13622        cap_flags: GimbalManagerCapFlags::DEFAULT,
13623        roll_min: 0.0_f32,
13624        roll_max: 0.0_f32,
13625        pitch_min: 0.0_f32,
13626        pitch_max: 0.0_f32,
13627        yaw_min: 0.0_f32,
13628        yaw_max: 0.0_f32,
13629        gimbal_device_id: 0_u8,
13630    };
13631    #[cfg(feature = "arbitrary")]
13632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13633        use arbitrary::{Arbitrary, Unstructured};
13634        let mut buf = [0u8; 1024];
13635        rng.fill_bytes(&mut buf);
13636        let mut unstructured = Unstructured::new(&buf);
13637        Self::arbitrary(&mut unstructured).unwrap_or_default()
13638    }
13639}
13640impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13641    fn default() -> Self {
13642        Self::DEFAULT.clone()
13643    }
13644}
13645impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13646    type Message = MavMessage;
13647    const ID: u32 = 280u32;
13648    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13649    const EXTRA_CRC: u8 = 70u8;
13650    const ENCODED_LEN: usize = 33usize;
13651    fn deser(
13652        _version: MavlinkVersion,
13653        __input: &[u8],
13654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13655        let avail_len = __input.len();
13656        let mut payload_buf = [0; Self::ENCODED_LEN];
13657        let mut buf = if avail_len < Self::ENCODED_LEN {
13658            payload_buf[0..avail_len].copy_from_slice(__input);
13659            Bytes::new(&payload_buf)
13660        } else {
13661            Bytes::new(__input)
13662        };
13663        let mut __struct = Self::default();
13664        __struct.time_boot_ms = buf.get_u32_le();
13665        let tmp = buf.get_u32_le();
13666        __struct.cap_flags = GimbalManagerCapFlags::from_bits(tmp).ok_or(
13667            ::mavlink_core::error::ParserError::InvalidFlag {
13668                flag_type: "GimbalManagerCapFlags",
13669                value: tmp as u64,
13670            },
13671        )?;
13672        __struct.roll_min = buf.get_f32_le();
13673        __struct.roll_max = buf.get_f32_le();
13674        __struct.pitch_min = buf.get_f32_le();
13675        __struct.pitch_max = buf.get_f32_le();
13676        __struct.yaw_min = buf.get_f32_le();
13677        __struct.yaw_max = buf.get_f32_le();
13678        __struct.gimbal_device_id = buf.get_u8();
13679        Ok(__struct)
13680    }
13681    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13682        let mut __tmp = BytesMut::new(bytes);
13683        #[allow(clippy::absurd_extreme_comparisons)]
13684        #[allow(unused_comparisons)]
13685        if __tmp.remaining() < Self::ENCODED_LEN {
13686            panic!(
13687                "buffer is too small (need {} bytes, but got {})",
13688                Self::ENCODED_LEN,
13689                __tmp.remaining(),
13690            )
13691        }
13692        __tmp.put_u32_le(self.time_boot_ms);
13693        __tmp.put_u32_le(self.cap_flags.bits());
13694        __tmp.put_f32_le(self.roll_min);
13695        __tmp.put_f32_le(self.roll_max);
13696        __tmp.put_f32_le(self.pitch_min);
13697        __tmp.put_f32_le(self.pitch_max);
13698        __tmp.put_f32_le(self.yaw_min);
13699        __tmp.put_f32_le(self.yaw_max);
13700        __tmp.put_u8(self.gimbal_device_id);
13701        if matches!(version, MavlinkVersion::V2) {
13702            let len = __tmp.len();
13703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13704        } else {
13705            __tmp.len()
13706        }
13707    }
13708}
13709#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13710#[doc = ""]
13711#[doc = "ID: 282"]
13712#[derive(Debug, Clone, PartialEq)]
13713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13715#[cfg_attr(feature = "ts", derive(TS))]
13716#[cfg_attr(feature = "ts", ts(export))]
13717pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13718    #[doc = "High level gimbal manager flags to use."]
13719    pub flags: GimbalManagerFlags,
13720    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13723    pub q: [f32; 4],
13724    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13725    pub angular_velocity_x: f32,
13726    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13727    pub angular_velocity_y: f32,
13728    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13729    pub angular_velocity_z: f32,
13730    #[doc = "System ID"]
13731    pub target_system: u8,
13732    #[doc = "Component ID"]
13733    pub target_component: u8,
13734    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13735    pub gimbal_device_id: u8,
13736}
13737impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13738    pub const ENCODED_LEN: usize = 35usize;
13739    pub const DEFAULT: Self = Self {
13740        flags: GimbalManagerFlags::DEFAULT,
13741        q: [0.0_f32; 4usize],
13742        angular_velocity_x: 0.0_f32,
13743        angular_velocity_y: 0.0_f32,
13744        angular_velocity_z: 0.0_f32,
13745        target_system: 0_u8,
13746        target_component: 0_u8,
13747        gimbal_device_id: 0_u8,
13748    };
13749    #[cfg(feature = "arbitrary")]
13750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13751        use arbitrary::{Arbitrary, Unstructured};
13752        let mut buf = [0u8; 1024];
13753        rng.fill_bytes(&mut buf);
13754        let mut unstructured = Unstructured::new(&buf);
13755        Self::arbitrary(&mut unstructured).unwrap_or_default()
13756    }
13757}
13758impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13759    fn default() -> Self {
13760        Self::DEFAULT.clone()
13761    }
13762}
13763impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13764    type Message = MavMessage;
13765    const ID: u32 = 282u32;
13766    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13767    const EXTRA_CRC: u8 = 123u8;
13768    const ENCODED_LEN: usize = 35usize;
13769    fn deser(
13770        _version: MavlinkVersion,
13771        __input: &[u8],
13772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13773        let avail_len = __input.len();
13774        let mut payload_buf = [0; Self::ENCODED_LEN];
13775        let mut buf = if avail_len < Self::ENCODED_LEN {
13776            payload_buf[0..avail_len].copy_from_slice(__input);
13777            Bytes::new(&payload_buf)
13778        } else {
13779            Bytes::new(__input)
13780        };
13781        let mut __struct = Self::default();
13782        let tmp = buf.get_u32_le();
13783        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13784            ::mavlink_core::error::ParserError::InvalidFlag {
13785                flag_type: "GimbalManagerFlags",
13786                value: tmp as u64,
13787            },
13788        )?;
13789        for v in &mut __struct.q {
13790            let val = buf.get_f32_le();
13791            *v = val;
13792        }
13793        __struct.angular_velocity_x = buf.get_f32_le();
13794        __struct.angular_velocity_y = buf.get_f32_le();
13795        __struct.angular_velocity_z = buf.get_f32_le();
13796        __struct.target_system = buf.get_u8();
13797        __struct.target_component = buf.get_u8();
13798        __struct.gimbal_device_id = buf.get_u8();
13799        Ok(__struct)
13800    }
13801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13802        let mut __tmp = BytesMut::new(bytes);
13803        #[allow(clippy::absurd_extreme_comparisons)]
13804        #[allow(unused_comparisons)]
13805        if __tmp.remaining() < Self::ENCODED_LEN {
13806            panic!(
13807                "buffer is too small (need {} bytes, but got {})",
13808                Self::ENCODED_LEN,
13809                __tmp.remaining(),
13810            )
13811        }
13812        __tmp.put_u32_le(self.flags.bits());
13813        for val in &self.q {
13814            __tmp.put_f32_le(*val);
13815        }
13816        __tmp.put_f32_le(self.angular_velocity_x);
13817        __tmp.put_f32_le(self.angular_velocity_y);
13818        __tmp.put_f32_le(self.angular_velocity_z);
13819        __tmp.put_u8(self.target_system);
13820        __tmp.put_u8(self.target_component);
13821        __tmp.put_u8(self.gimbal_device_id);
13822        if matches!(version, MavlinkVersion::V2) {
13823            let len = __tmp.len();
13824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13825        } else {
13826            __tmp.len()
13827        }
13828    }
13829}
13830#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13831#[doc = ""]
13832#[doc = "ID: 288"]
13833#[derive(Debug, Clone, PartialEq)]
13834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13836#[cfg_attr(feature = "ts", derive(TS))]
13837#[cfg_attr(feature = "ts", ts(export))]
13838pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13839    #[doc = "High level gimbal manager flags."]
13840    pub flags: GimbalManagerFlags,
13841    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13842    pub pitch: f32,
13843    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13844    pub yaw: f32,
13845    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13846    pub pitch_rate: f32,
13847    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13848    pub yaw_rate: f32,
13849    #[doc = "System ID"]
13850    pub target_system: u8,
13851    #[doc = "Component ID"]
13852    pub target_component: u8,
13853    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13854    pub gimbal_device_id: u8,
13855}
13856impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13857    pub const ENCODED_LEN: usize = 23usize;
13858    pub const DEFAULT: Self = Self {
13859        flags: GimbalManagerFlags::DEFAULT,
13860        pitch: 0.0_f32,
13861        yaw: 0.0_f32,
13862        pitch_rate: 0.0_f32,
13863        yaw_rate: 0.0_f32,
13864        target_system: 0_u8,
13865        target_component: 0_u8,
13866        gimbal_device_id: 0_u8,
13867    };
13868    #[cfg(feature = "arbitrary")]
13869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13870        use arbitrary::{Arbitrary, Unstructured};
13871        let mut buf = [0u8; 1024];
13872        rng.fill_bytes(&mut buf);
13873        let mut unstructured = Unstructured::new(&buf);
13874        Self::arbitrary(&mut unstructured).unwrap_or_default()
13875    }
13876}
13877impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13878    fn default() -> Self {
13879        Self::DEFAULT.clone()
13880    }
13881}
13882impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13883    type Message = MavMessage;
13884    const ID: u32 = 288u32;
13885    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13886    const EXTRA_CRC: u8 = 20u8;
13887    const ENCODED_LEN: usize = 23usize;
13888    fn deser(
13889        _version: MavlinkVersion,
13890        __input: &[u8],
13891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13892        let avail_len = __input.len();
13893        let mut payload_buf = [0; Self::ENCODED_LEN];
13894        let mut buf = if avail_len < Self::ENCODED_LEN {
13895            payload_buf[0..avail_len].copy_from_slice(__input);
13896            Bytes::new(&payload_buf)
13897        } else {
13898            Bytes::new(__input)
13899        };
13900        let mut __struct = Self::default();
13901        let tmp = buf.get_u32_le();
13902        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13903            ::mavlink_core::error::ParserError::InvalidFlag {
13904                flag_type: "GimbalManagerFlags",
13905                value: tmp as u64,
13906            },
13907        )?;
13908        __struct.pitch = buf.get_f32_le();
13909        __struct.yaw = buf.get_f32_le();
13910        __struct.pitch_rate = buf.get_f32_le();
13911        __struct.yaw_rate = buf.get_f32_le();
13912        __struct.target_system = buf.get_u8();
13913        __struct.target_component = buf.get_u8();
13914        __struct.gimbal_device_id = buf.get_u8();
13915        Ok(__struct)
13916    }
13917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13918        let mut __tmp = BytesMut::new(bytes);
13919        #[allow(clippy::absurd_extreme_comparisons)]
13920        #[allow(unused_comparisons)]
13921        if __tmp.remaining() < Self::ENCODED_LEN {
13922            panic!(
13923                "buffer is too small (need {} bytes, but got {})",
13924                Self::ENCODED_LEN,
13925                __tmp.remaining(),
13926            )
13927        }
13928        __tmp.put_u32_le(self.flags.bits());
13929        __tmp.put_f32_le(self.pitch);
13930        __tmp.put_f32_le(self.yaw);
13931        __tmp.put_f32_le(self.pitch_rate);
13932        __tmp.put_f32_le(self.yaw_rate);
13933        __tmp.put_u8(self.target_system);
13934        __tmp.put_u8(self.target_component);
13935        __tmp.put_u8(self.gimbal_device_id);
13936        if matches!(version, MavlinkVersion::V2) {
13937            let len = __tmp.len();
13938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13939        } else {
13940            __tmp.len()
13941        }
13942    }
13943}
13944#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13945#[doc = ""]
13946#[doc = "ID: 287"]
13947#[derive(Debug, Clone, PartialEq)]
13948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13950#[cfg_attr(feature = "ts", derive(TS))]
13951#[cfg_attr(feature = "ts", ts(export))]
13952pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13953    #[doc = "High level gimbal manager flags to use."]
13954    pub flags: GimbalManagerFlags,
13955    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13956    pub pitch: f32,
13957    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13958    pub yaw: f32,
13959    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13960    pub pitch_rate: f32,
13961    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13962    pub yaw_rate: f32,
13963    #[doc = "System ID"]
13964    pub target_system: u8,
13965    #[doc = "Component ID"]
13966    pub target_component: u8,
13967    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13968    pub gimbal_device_id: u8,
13969}
13970impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13971    pub const ENCODED_LEN: usize = 23usize;
13972    pub const DEFAULT: Self = Self {
13973        flags: GimbalManagerFlags::DEFAULT,
13974        pitch: 0.0_f32,
13975        yaw: 0.0_f32,
13976        pitch_rate: 0.0_f32,
13977        yaw_rate: 0.0_f32,
13978        target_system: 0_u8,
13979        target_component: 0_u8,
13980        gimbal_device_id: 0_u8,
13981    };
13982    #[cfg(feature = "arbitrary")]
13983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13984        use arbitrary::{Arbitrary, Unstructured};
13985        let mut buf = [0u8; 1024];
13986        rng.fill_bytes(&mut buf);
13987        let mut unstructured = Unstructured::new(&buf);
13988        Self::arbitrary(&mut unstructured).unwrap_or_default()
13989    }
13990}
13991impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13992    fn default() -> Self {
13993        Self::DEFAULT.clone()
13994    }
13995}
13996impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13997    type Message = MavMessage;
13998    const ID: u32 = 287u32;
13999    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14000    const EXTRA_CRC: u8 = 1u8;
14001    const ENCODED_LEN: usize = 23usize;
14002    fn deser(
14003        _version: MavlinkVersion,
14004        __input: &[u8],
14005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14006        let avail_len = __input.len();
14007        let mut payload_buf = [0; Self::ENCODED_LEN];
14008        let mut buf = if avail_len < Self::ENCODED_LEN {
14009            payload_buf[0..avail_len].copy_from_slice(__input);
14010            Bytes::new(&payload_buf)
14011        } else {
14012            Bytes::new(__input)
14013        };
14014        let mut __struct = Self::default();
14015        let tmp = buf.get_u32_le();
14016        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14017            ::mavlink_core::error::ParserError::InvalidFlag {
14018                flag_type: "GimbalManagerFlags",
14019                value: tmp as u64,
14020            },
14021        )?;
14022        __struct.pitch = buf.get_f32_le();
14023        __struct.yaw = buf.get_f32_le();
14024        __struct.pitch_rate = buf.get_f32_le();
14025        __struct.yaw_rate = buf.get_f32_le();
14026        __struct.target_system = buf.get_u8();
14027        __struct.target_component = buf.get_u8();
14028        __struct.gimbal_device_id = buf.get_u8();
14029        Ok(__struct)
14030    }
14031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14032        let mut __tmp = BytesMut::new(bytes);
14033        #[allow(clippy::absurd_extreme_comparisons)]
14034        #[allow(unused_comparisons)]
14035        if __tmp.remaining() < Self::ENCODED_LEN {
14036            panic!(
14037                "buffer is too small (need {} bytes, but got {})",
14038                Self::ENCODED_LEN,
14039                __tmp.remaining(),
14040            )
14041        }
14042        __tmp.put_u32_le(self.flags.bits());
14043        __tmp.put_f32_le(self.pitch);
14044        __tmp.put_f32_le(self.yaw);
14045        __tmp.put_f32_le(self.pitch_rate);
14046        __tmp.put_f32_le(self.yaw_rate);
14047        __tmp.put_u8(self.target_system);
14048        __tmp.put_u8(self.target_component);
14049        __tmp.put_u8(self.gimbal_device_id);
14050        if matches!(version, MavlinkVersion::V2) {
14051            let len = __tmp.len();
14052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14053        } else {
14054            __tmp.len()
14055        }
14056    }
14057}
14058#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14059#[doc = ""]
14060#[doc = "ID: 281"]
14061#[derive(Debug, Clone, PartialEq)]
14062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14064#[cfg_attr(feature = "ts", derive(TS))]
14065#[cfg_attr(feature = "ts", ts(export))]
14066pub struct GIMBAL_MANAGER_STATUS_DATA {
14067    #[doc = "Timestamp (time since system boot)."]
14068    pub time_boot_ms: u32,
14069    #[doc = "High level gimbal manager flags currently applied."]
14070    pub flags: GimbalManagerFlags,
14071    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14072    pub gimbal_device_id: u8,
14073    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14074    pub primary_control_sysid: u8,
14075    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14076    pub primary_control_compid: u8,
14077    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14078    pub secondary_control_sysid: u8,
14079    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14080    pub secondary_control_compid: u8,
14081}
14082impl GIMBAL_MANAGER_STATUS_DATA {
14083    pub const ENCODED_LEN: usize = 13usize;
14084    pub const DEFAULT: Self = Self {
14085        time_boot_ms: 0_u32,
14086        flags: GimbalManagerFlags::DEFAULT,
14087        gimbal_device_id: 0_u8,
14088        primary_control_sysid: 0_u8,
14089        primary_control_compid: 0_u8,
14090        secondary_control_sysid: 0_u8,
14091        secondary_control_compid: 0_u8,
14092    };
14093    #[cfg(feature = "arbitrary")]
14094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14095        use arbitrary::{Arbitrary, Unstructured};
14096        let mut buf = [0u8; 1024];
14097        rng.fill_bytes(&mut buf);
14098        let mut unstructured = Unstructured::new(&buf);
14099        Self::arbitrary(&mut unstructured).unwrap_or_default()
14100    }
14101}
14102impl Default for GIMBAL_MANAGER_STATUS_DATA {
14103    fn default() -> Self {
14104        Self::DEFAULT.clone()
14105    }
14106}
14107impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14108    type Message = MavMessage;
14109    const ID: u32 = 281u32;
14110    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14111    const EXTRA_CRC: u8 = 48u8;
14112    const ENCODED_LEN: usize = 13usize;
14113    fn deser(
14114        _version: MavlinkVersion,
14115        __input: &[u8],
14116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14117        let avail_len = __input.len();
14118        let mut payload_buf = [0; Self::ENCODED_LEN];
14119        let mut buf = if avail_len < Self::ENCODED_LEN {
14120            payload_buf[0..avail_len].copy_from_slice(__input);
14121            Bytes::new(&payload_buf)
14122        } else {
14123            Bytes::new(__input)
14124        };
14125        let mut __struct = Self::default();
14126        __struct.time_boot_ms = buf.get_u32_le();
14127        let tmp = buf.get_u32_le();
14128        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
14129            ::mavlink_core::error::ParserError::InvalidFlag {
14130                flag_type: "GimbalManagerFlags",
14131                value: tmp as u64,
14132            },
14133        )?;
14134        __struct.gimbal_device_id = buf.get_u8();
14135        __struct.primary_control_sysid = buf.get_u8();
14136        __struct.primary_control_compid = buf.get_u8();
14137        __struct.secondary_control_sysid = buf.get_u8();
14138        __struct.secondary_control_compid = buf.get_u8();
14139        Ok(__struct)
14140    }
14141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14142        let mut __tmp = BytesMut::new(bytes);
14143        #[allow(clippy::absurd_extreme_comparisons)]
14144        #[allow(unused_comparisons)]
14145        if __tmp.remaining() < Self::ENCODED_LEN {
14146            panic!(
14147                "buffer is too small (need {} bytes, but got {})",
14148                Self::ENCODED_LEN,
14149                __tmp.remaining(),
14150            )
14151        }
14152        __tmp.put_u32_le(self.time_boot_ms);
14153        __tmp.put_u32_le(self.flags.bits());
14154        __tmp.put_u8(self.gimbal_device_id);
14155        __tmp.put_u8(self.primary_control_sysid);
14156        __tmp.put_u8(self.primary_control_compid);
14157        __tmp.put_u8(self.secondary_control_sysid);
14158        __tmp.put_u8(self.secondary_control_compid);
14159        if matches!(version, MavlinkVersion::V2) {
14160            let len = __tmp.len();
14161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14162        } else {
14163            __tmp.len()
14164        }
14165    }
14166}
14167#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14168#[doc = ""]
14169#[doc = "ID: 33"]
14170#[derive(Debug, Clone, PartialEq)]
14171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14173#[cfg_attr(feature = "ts", derive(TS))]
14174#[cfg_attr(feature = "ts", ts(export))]
14175pub struct GLOBAL_POSITION_INT_DATA {
14176    #[doc = "Timestamp (time since system boot)."]
14177    pub time_boot_ms: u32,
14178    #[doc = "Latitude, expressed"]
14179    pub lat: i32,
14180    #[doc = "Longitude, expressed"]
14181    pub lon: i32,
14182    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14183    pub alt: i32,
14184    #[doc = "Altitude above home"]
14185    pub relative_alt: i32,
14186    #[doc = "Ground X Speed (Latitude, positive north)"]
14187    pub vx: i16,
14188    #[doc = "Ground Y Speed (Longitude, positive east)"]
14189    pub vy: i16,
14190    #[doc = "Ground Z Speed (Altitude, positive down)"]
14191    pub vz: i16,
14192    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14193    pub hdg: u16,
14194}
14195impl GLOBAL_POSITION_INT_DATA {
14196    pub const ENCODED_LEN: usize = 28usize;
14197    pub const DEFAULT: Self = Self {
14198        time_boot_ms: 0_u32,
14199        lat: 0_i32,
14200        lon: 0_i32,
14201        alt: 0_i32,
14202        relative_alt: 0_i32,
14203        vx: 0_i16,
14204        vy: 0_i16,
14205        vz: 0_i16,
14206        hdg: 0_u16,
14207    };
14208    #[cfg(feature = "arbitrary")]
14209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14210        use arbitrary::{Arbitrary, Unstructured};
14211        let mut buf = [0u8; 1024];
14212        rng.fill_bytes(&mut buf);
14213        let mut unstructured = Unstructured::new(&buf);
14214        Self::arbitrary(&mut unstructured).unwrap_or_default()
14215    }
14216}
14217impl Default for GLOBAL_POSITION_INT_DATA {
14218    fn default() -> Self {
14219        Self::DEFAULT.clone()
14220    }
14221}
14222impl MessageData for GLOBAL_POSITION_INT_DATA {
14223    type Message = MavMessage;
14224    const ID: u32 = 33u32;
14225    const NAME: &'static str = "GLOBAL_POSITION_INT";
14226    const EXTRA_CRC: u8 = 104u8;
14227    const ENCODED_LEN: usize = 28usize;
14228    fn deser(
14229        _version: MavlinkVersion,
14230        __input: &[u8],
14231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14232        let avail_len = __input.len();
14233        let mut payload_buf = [0; Self::ENCODED_LEN];
14234        let mut buf = if avail_len < Self::ENCODED_LEN {
14235            payload_buf[0..avail_len].copy_from_slice(__input);
14236            Bytes::new(&payload_buf)
14237        } else {
14238            Bytes::new(__input)
14239        };
14240        let mut __struct = Self::default();
14241        __struct.time_boot_ms = buf.get_u32_le();
14242        __struct.lat = buf.get_i32_le();
14243        __struct.lon = buf.get_i32_le();
14244        __struct.alt = buf.get_i32_le();
14245        __struct.relative_alt = buf.get_i32_le();
14246        __struct.vx = buf.get_i16_le();
14247        __struct.vy = buf.get_i16_le();
14248        __struct.vz = buf.get_i16_le();
14249        __struct.hdg = buf.get_u16_le();
14250        Ok(__struct)
14251    }
14252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14253        let mut __tmp = BytesMut::new(bytes);
14254        #[allow(clippy::absurd_extreme_comparisons)]
14255        #[allow(unused_comparisons)]
14256        if __tmp.remaining() < Self::ENCODED_LEN {
14257            panic!(
14258                "buffer is too small (need {} bytes, but got {})",
14259                Self::ENCODED_LEN,
14260                __tmp.remaining(),
14261            )
14262        }
14263        __tmp.put_u32_le(self.time_boot_ms);
14264        __tmp.put_i32_le(self.lat);
14265        __tmp.put_i32_le(self.lon);
14266        __tmp.put_i32_le(self.alt);
14267        __tmp.put_i32_le(self.relative_alt);
14268        __tmp.put_i16_le(self.vx);
14269        __tmp.put_i16_le(self.vy);
14270        __tmp.put_i16_le(self.vz);
14271        __tmp.put_u16_le(self.hdg);
14272        if matches!(version, MavlinkVersion::V2) {
14273            let len = __tmp.len();
14274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14275        } else {
14276            __tmp.len()
14277        }
14278    }
14279}
14280#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14281#[doc = ""]
14282#[doc = "ID: 63"]
14283#[derive(Debug, Clone, PartialEq)]
14284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14286#[cfg_attr(feature = "ts", derive(TS))]
14287#[cfg_attr(feature = "ts", ts(export))]
14288pub struct GLOBAL_POSITION_INT_COV_DATA {
14289    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14290    pub time_usec: u64,
14291    #[doc = "Latitude"]
14292    pub lat: i32,
14293    #[doc = "Longitude"]
14294    pub lon: i32,
14295    #[doc = "Altitude in meters above MSL"]
14296    pub alt: i32,
14297    #[doc = "Altitude above ground"]
14298    pub relative_alt: i32,
14299    #[doc = "Ground X Speed (Latitude)"]
14300    pub vx: f32,
14301    #[doc = "Ground Y Speed (Longitude)"]
14302    pub vy: f32,
14303    #[doc = "Ground Z Speed (Altitude)"]
14304    pub vz: f32,
14305    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14308    pub covariance: [f32; 36],
14309    #[doc = "Class id of the estimator this estimate originated from."]
14310    pub estimator_type: MavEstimatorType,
14311}
14312impl GLOBAL_POSITION_INT_COV_DATA {
14313    pub const ENCODED_LEN: usize = 181usize;
14314    pub const DEFAULT: Self = Self {
14315        time_usec: 0_u64,
14316        lat: 0_i32,
14317        lon: 0_i32,
14318        alt: 0_i32,
14319        relative_alt: 0_i32,
14320        vx: 0.0_f32,
14321        vy: 0.0_f32,
14322        vz: 0.0_f32,
14323        covariance: [0.0_f32; 36usize],
14324        estimator_type: MavEstimatorType::DEFAULT,
14325    };
14326    #[cfg(feature = "arbitrary")]
14327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14328        use arbitrary::{Arbitrary, Unstructured};
14329        let mut buf = [0u8; 1024];
14330        rng.fill_bytes(&mut buf);
14331        let mut unstructured = Unstructured::new(&buf);
14332        Self::arbitrary(&mut unstructured).unwrap_or_default()
14333    }
14334}
14335impl Default for GLOBAL_POSITION_INT_COV_DATA {
14336    fn default() -> Self {
14337        Self::DEFAULT.clone()
14338    }
14339}
14340impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14341    type Message = MavMessage;
14342    const ID: u32 = 63u32;
14343    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14344    const EXTRA_CRC: u8 = 119u8;
14345    const ENCODED_LEN: usize = 181usize;
14346    fn deser(
14347        _version: MavlinkVersion,
14348        __input: &[u8],
14349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14350        let avail_len = __input.len();
14351        let mut payload_buf = [0; Self::ENCODED_LEN];
14352        let mut buf = if avail_len < Self::ENCODED_LEN {
14353            payload_buf[0..avail_len].copy_from_slice(__input);
14354            Bytes::new(&payload_buf)
14355        } else {
14356            Bytes::new(__input)
14357        };
14358        let mut __struct = Self::default();
14359        __struct.time_usec = buf.get_u64_le();
14360        __struct.lat = buf.get_i32_le();
14361        __struct.lon = buf.get_i32_le();
14362        __struct.alt = buf.get_i32_le();
14363        __struct.relative_alt = buf.get_i32_le();
14364        __struct.vx = buf.get_f32_le();
14365        __struct.vy = buf.get_f32_le();
14366        __struct.vz = buf.get_f32_le();
14367        for v in &mut __struct.covariance {
14368            let val = buf.get_f32_le();
14369            *v = val;
14370        }
14371        let tmp = buf.get_u8();
14372        __struct.estimator_type =
14373            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14374                enum_type: "MavEstimatorType",
14375                value: tmp as u64,
14376            })?;
14377        Ok(__struct)
14378    }
14379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14380        let mut __tmp = BytesMut::new(bytes);
14381        #[allow(clippy::absurd_extreme_comparisons)]
14382        #[allow(unused_comparisons)]
14383        if __tmp.remaining() < Self::ENCODED_LEN {
14384            panic!(
14385                "buffer is too small (need {} bytes, but got {})",
14386                Self::ENCODED_LEN,
14387                __tmp.remaining(),
14388            )
14389        }
14390        __tmp.put_u64_le(self.time_usec);
14391        __tmp.put_i32_le(self.lat);
14392        __tmp.put_i32_le(self.lon);
14393        __tmp.put_i32_le(self.alt);
14394        __tmp.put_i32_le(self.relative_alt);
14395        __tmp.put_f32_le(self.vx);
14396        __tmp.put_f32_le(self.vy);
14397        __tmp.put_f32_le(self.vz);
14398        for val in &self.covariance {
14399            __tmp.put_f32_le(*val);
14400        }
14401        __tmp.put_u8(self.estimator_type as u8);
14402        if matches!(version, MavlinkVersion::V2) {
14403            let len = __tmp.len();
14404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14405        } else {
14406            __tmp.len()
14407        }
14408    }
14409}
14410#[doc = "Global position/attitude estimate from a vision source."]
14411#[doc = ""]
14412#[doc = "ID: 101"]
14413#[derive(Debug, Clone, PartialEq)]
14414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14416#[cfg_attr(feature = "ts", derive(TS))]
14417#[cfg_attr(feature = "ts", ts(export))]
14418pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14419    #[doc = "Timestamp (UNIX time or since system boot)"]
14420    pub usec: u64,
14421    #[doc = "Global X position"]
14422    pub x: f32,
14423    #[doc = "Global Y position"]
14424    pub y: f32,
14425    #[doc = "Global Z position"]
14426    pub z: f32,
14427    #[doc = "Roll angle"]
14428    pub roll: f32,
14429    #[doc = "Pitch angle"]
14430    pub pitch: f32,
14431    #[doc = "Yaw angle"]
14432    pub yaw: f32,
14433    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14437    pub covariance: [f32; 21],
14438    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14440    pub reset_counter: u8,
14441}
14442impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14443    pub const ENCODED_LEN: usize = 117usize;
14444    pub const DEFAULT: Self = Self {
14445        usec: 0_u64,
14446        x: 0.0_f32,
14447        y: 0.0_f32,
14448        z: 0.0_f32,
14449        roll: 0.0_f32,
14450        pitch: 0.0_f32,
14451        yaw: 0.0_f32,
14452        covariance: [0.0_f32; 21usize],
14453        reset_counter: 0_u8,
14454    };
14455    #[cfg(feature = "arbitrary")]
14456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14457        use arbitrary::{Arbitrary, Unstructured};
14458        let mut buf = [0u8; 1024];
14459        rng.fill_bytes(&mut buf);
14460        let mut unstructured = Unstructured::new(&buf);
14461        Self::arbitrary(&mut unstructured).unwrap_or_default()
14462    }
14463}
14464impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14465    fn default() -> Self {
14466        Self::DEFAULT.clone()
14467    }
14468}
14469impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14470    type Message = MavMessage;
14471    const ID: u32 = 101u32;
14472    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14473    const EXTRA_CRC: u8 = 102u8;
14474    const ENCODED_LEN: usize = 117usize;
14475    fn deser(
14476        _version: MavlinkVersion,
14477        __input: &[u8],
14478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14479        let avail_len = __input.len();
14480        let mut payload_buf = [0; Self::ENCODED_LEN];
14481        let mut buf = if avail_len < Self::ENCODED_LEN {
14482            payload_buf[0..avail_len].copy_from_slice(__input);
14483            Bytes::new(&payload_buf)
14484        } else {
14485            Bytes::new(__input)
14486        };
14487        let mut __struct = Self::default();
14488        __struct.usec = buf.get_u64_le();
14489        __struct.x = buf.get_f32_le();
14490        __struct.y = buf.get_f32_le();
14491        __struct.z = buf.get_f32_le();
14492        __struct.roll = buf.get_f32_le();
14493        __struct.pitch = buf.get_f32_le();
14494        __struct.yaw = buf.get_f32_le();
14495        for v in &mut __struct.covariance {
14496            let val = buf.get_f32_le();
14497            *v = val;
14498        }
14499        __struct.reset_counter = buf.get_u8();
14500        Ok(__struct)
14501    }
14502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14503        let mut __tmp = BytesMut::new(bytes);
14504        #[allow(clippy::absurd_extreme_comparisons)]
14505        #[allow(unused_comparisons)]
14506        if __tmp.remaining() < Self::ENCODED_LEN {
14507            panic!(
14508                "buffer is too small (need {} bytes, but got {})",
14509                Self::ENCODED_LEN,
14510                __tmp.remaining(),
14511            )
14512        }
14513        __tmp.put_u64_le(self.usec);
14514        __tmp.put_f32_le(self.x);
14515        __tmp.put_f32_le(self.y);
14516        __tmp.put_f32_le(self.z);
14517        __tmp.put_f32_le(self.roll);
14518        __tmp.put_f32_le(self.pitch);
14519        __tmp.put_f32_le(self.yaw);
14520        if matches!(version, MavlinkVersion::V2) {
14521            for val in &self.covariance {
14522                __tmp.put_f32_le(*val);
14523            }
14524            __tmp.put_u8(self.reset_counter);
14525            let len = __tmp.len();
14526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14527        } else {
14528            __tmp.len()
14529        }
14530    }
14531}
14532#[doc = "Second GPS data."]
14533#[doc = ""]
14534#[doc = "ID: 124"]
14535#[derive(Debug, Clone, PartialEq)]
14536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14538#[cfg_attr(feature = "ts", derive(TS))]
14539#[cfg_attr(feature = "ts", ts(export))]
14540pub struct GPS2_RAW_DATA {
14541    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14542    pub time_usec: u64,
14543    #[doc = "Latitude (WGS84)"]
14544    pub lat: i32,
14545    #[doc = "Longitude (WGS84)"]
14546    pub lon: i32,
14547    #[doc = "Altitude (MSL). Positive for up."]
14548    pub alt: i32,
14549    #[doc = "Age of DGPS info"]
14550    pub dgps_age: u32,
14551    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14552    pub eph: u16,
14553    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14554    pub epv: u16,
14555    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14556    pub vel: u16,
14557    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14558    pub cog: u16,
14559    #[doc = "GPS fix type."]
14560    pub fix_type: GpsFixType,
14561    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14562    pub satellites_visible: u8,
14563    #[doc = "Number of DGPS satellites"]
14564    pub dgps_numch: u8,
14565    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14566    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14567    pub yaw: u16,
14568    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14569    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14570    pub alt_ellipsoid: i32,
14571    #[doc = "Position uncertainty."]
14572    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14573    pub h_acc: u32,
14574    #[doc = "Altitude uncertainty."]
14575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14576    pub v_acc: u32,
14577    #[doc = "Speed uncertainty."]
14578    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14579    pub vel_acc: u32,
14580    #[doc = "Heading / track uncertainty"]
14581    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14582    pub hdg_acc: u32,
14583}
14584impl GPS2_RAW_DATA {
14585    pub const ENCODED_LEN: usize = 57usize;
14586    pub const DEFAULT: Self = Self {
14587        time_usec: 0_u64,
14588        lat: 0_i32,
14589        lon: 0_i32,
14590        alt: 0_i32,
14591        dgps_age: 0_u32,
14592        eph: 0_u16,
14593        epv: 0_u16,
14594        vel: 0_u16,
14595        cog: 0_u16,
14596        fix_type: GpsFixType::DEFAULT,
14597        satellites_visible: 0_u8,
14598        dgps_numch: 0_u8,
14599        yaw: 0_u16,
14600        alt_ellipsoid: 0_i32,
14601        h_acc: 0_u32,
14602        v_acc: 0_u32,
14603        vel_acc: 0_u32,
14604        hdg_acc: 0_u32,
14605    };
14606    #[cfg(feature = "arbitrary")]
14607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14608        use arbitrary::{Arbitrary, Unstructured};
14609        let mut buf = [0u8; 1024];
14610        rng.fill_bytes(&mut buf);
14611        let mut unstructured = Unstructured::new(&buf);
14612        Self::arbitrary(&mut unstructured).unwrap_or_default()
14613    }
14614}
14615impl Default for GPS2_RAW_DATA {
14616    fn default() -> Self {
14617        Self::DEFAULT.clone()
14618    }
14619}
14620impl MessageData for GPS2_RAW_DATA {
14621    type Message = MavMessage;
14622    const ID: u32 = 124u32;
14623    const NAME: &'static str = "GPS2_RAW";
14624    const EXTRA_CRC: u8 = 87u8;
14625    const ENCODED_LEN: usize = 57usize;
14626    fn deser(
14627        _version: MavlinkVersion,
14628        __input: &[u8],
14629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14630        let avail_len = __input.len();
14631        let mut payload_buf = [0; Self::ENCODED_LEN];
14632        let mut buf = if avail_len < Self::ENCODED_LEN {
14633            payload_buf[0..avail_len].copy_from_slice(__input);
14634            Bytes::new(&payload_buf)
14635        } else {
14636            Bytes::new(__input)
14637        };
14638        let mut __struct = Self::default();
14639        __struct.time_usec = buf.get_u64_le();
14640        __struct.lat = buf.get_i32_le();
14641        __struct.lon = buf.get_i32_le();
14642        __struct.alt = buf.get_i32_le();
14643        __struct.dgps_age = buf.get_u32_le();
14644        __struct.eph = buf.get_u16_le();
14645        __struct.epv = buf.get_u16_le();
14646        __struct.vel = buf.get_u16_le();
14647        __struct.cog = buf.get_u16_le();
14648        let tmp = buf.get_u8();
14649        __struct.fix_type =
14650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14651                enum_type: "GpsFixType",
14652                value: tmp as u64,
14653            })?;
14654        __struct.satellites_visible = buf.get_u8();
14655        __struct.dgps_numch = buf.get_u8();
14656        __struct.yaw = buf.get_u16_le();
14657        __struct.alt_ellipsoid = buf.get_i32_le();
14658        __struct.h_acc = buf.get_u32_le();
14659        __struct.v_acc = buf.get_u32_le();
14660        __struct.vel_acc = buf.get_u32_le();
14661        __struct.hdg_acc = buf.get_u32_le();
14662        Ok(__struct)
14663    }
14664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14665        let mut __tmp = BytesMut::new(bytes);
14666        #[allow(clippy::absurd_extreme_comparisons)]
14667        #[allow(unused_comparisons)]
14668        if __tmp.remaining() < Self::ENCODED_LEN {
14669            panic!(
14670                "buffer is too small (need {} bytes, but got {})",
14671                Self::ENCODED_LEN,
14672                __tmp.remaining(),
14673            )
14674        }
14675        __tmp.put_u64_le(self.time_usec);
14676        __tmp.put_i32_le(self.lat);
14677        __tmp.put_i32_le(self.lon);
14678        __tmp.put_i32_le(self.alt);
14679        __tmp.put_u32_le(self.dgps_age);
14680        __tmp.put_u16_le(self.eph);
14681        __tmp.put_u16_le(self.epv);
14682        __tmp.put_u16_le(self.vel);
14683        __tmp.put_u16_le(self.cog);
14684        __tmp.put_u8(self.fix_type as u8);
14685        __tmp.put_u8(self.satellites_visible);
14686        __tmp.put_u8(self.dgps_numch);
14687        if matches!(version, MavlinkVersion::V2) {
14688            __tmp.put_u16_le(self.yaw);
14689            __tmp.put_i32_le(self.alt_ellipsoid);
14690            __tmp.put_u32_le(self.h_acc);
14691            __tmp.put_u32_le(self.v_acc);
14692            __tmp.put_u32_le(self.vel_acc);
14693            __tmp.put_u32_le(self.hdg_acc);
14694            let len = __tmp.len();
14695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14696        } else {
14697            __tmp.len()
14698        }
14699    }
14700}
14701#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14702#[doc = ""]
14703#[doc = "ID: 128"]
14704#[derive(Debug, Clone, PartialEq)]
14705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14707#[cfg_attr(feature = "ts", derive(TS))]
14708#[cfg_attr(feature = "ts", ts(export))]
14709pub struct GPS2_RTK_DATA {
14710    #[doc = "Time since boot of last baseline message received."]
14711    pub time_last_baseline_ms: u32,
14712    #[doc = "GPS Time of Week of last baseline"]
14713    pub tow: u32,
14714    #[doc = "Current baseline in ECEF x or NED north component."]
14715    pub baseline_a_mm: i32,
14716    #[doc = "Current baseline in ECEF y or NED east component."]
14717    pub baseline_b_mm: i32,
14718    #[doc = "Current baseline in ECEF z or NED down component."]
14719    pub baseline_c_mm: i32,
14720    #[doc = "Current estimate of baseline accuracy."]
14721    pub accuracy: u32,
14722    #[doc = "Current number of integer ambiguity hypotheses."]
14723    pub iar_num_hypotheses: i32,
14724    #[doc = "GPS Week Number of last baseline"]
14725    pub wn: u16,
14726    #[doc = "Identification of connected RTK receiver."]
14727    pub rtk_receiver_id: u8,
14728    #[doc = "GPS-specific health report for RTK data."]
14729    pub rtk_health: u8,
14730    #[doc = "Rate of baseline messages being received by GPS"]
14731    pub rtk_rate: u8,
14732    #[doc = "Current number of sats used for RTK calculation."]
14733    pub nsats: u8,
14734    #[doc = "Coordinate system of baseline"]
14735    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14736}
14737impl GPS2_RTK_DATA {
14738    pub const ENCODED_LEN: usize = 35usize;
14739    pub const DEFAULT: Self = Self {
14740        time_last_baseline_ms: 0_u32,
14741        tow: 0_u32,
14742        baseline_a_mm: 0_i32,
14743        baseline_b_mm: 0_i32,
14744        baseline_c_mm: 0_i32,
14745        accuracy: 0_u32,
14746        iar_num_hypotheses: 0_i32,
14747        wn: 0_u16,
14748        rtk_receiver_id: 0_u8,
14749        rtk_health: 0_u8,
14750        rtk_rate: 0_u8,
14751        nsats: 0_u8,
14752        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14753    };
14754    #[cfg(feature = "arbitrary")]
14755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14756        use arbitrary::{Arbitrary, Unstructured};
14757        let mut buf = [0u8; 1024];
14758        rng.fill_bytes(&mut buf);
14759        let mut unstructured = Unstructured::new(&buf);
14760        Self::arbitrary(&mut unstructured).unwrap_or_default()
14761    }
14762}
14763impl Default for GPS2_RTK_DATA {
14764    fn default() -> Self {
14765        Self::DEFAULT.clone()
14766    }
14767}
14768impl MessageData for GPS2_RTK_DATA {
14769    type Message = MavMessage;
14770    const ID: u32 = 128u32;
14771    const NAME: &'static str = "GPS2_RTK";
14772    const EXTRA_CRC: u8 = 226u8;
14773    const ENCODED_LEN: usize = 35usize;
14774    fn deser(
14775        _version: MavlinkVersion,
14776        __input: &[u8],
14777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14778        let avail_len = __input.len();
14779        let mut payload_buf = [0; Self::ENCODED_LEN];
14780        let mut buf = if avail_len < Self::ENCODED_LEN {
14781            payload_buf[0..avail_len].copy_from_slice(__input);
14782            Bytes::new(&payload_buf)
14783        } else {
14784            Bytes::new(__input)
14785        };
14786        let mut __struct = Self::default();
14787        __struct.time_last_baseline_ms = buf.get_u32_le();
14788        __struct.tow = buf.get_u32_le();
14789        __struct.baseline_a_mm = buf.get_i32_le();
14790        __struct.baseline_b_mm = buf.get_i32_le();
14791        __struct.baseline_c_mm = buf.get_i32_le();
14792        __struct.accuracy = buf.get_u32_le();
14793        __struct.iar_num_hypotheses = buf.get_i32_le();
14794        __struct.wn = buf.get_u16_le();
14795        __struct.rtk_receiver_id = buf.get_u8();
14796        __struct.rtk_health = buf.get_u8();
14797        __struct.rtk_rate = buf.get_u8();
14798        __struct.nsats = buf.get_u8();
14799        let tmp = buf.get_u8();
14800        __struct.baseline_coords_type =
14801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14802                enum_type: "RtkBaselineCoordinateSystem",
14803                value: tmp as u64,
14804            })?;
14805        Ok(__struct)
14806    }
14807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14808        let mut __tmp = BytesMut::new(bytes);
14809        #[allow(clippy::absurd_extreme_comparisons)]
14810        #[allow(unused_comparisons)]
14811        if __tmp.remaining() < Self::ENCODED_LEN {
14812            panic!(
14813                "buffer is too small (need {} bytes, but got {})",
14814                Self::ENCODED_LEN,
14815                __tmp.remaining(),
14816            )
14817        }
14818        __tmp.put_u32_le(self.time_last_baseline_ms);
14819        __tmp.put_u32_le(self.tow);
14820        __tmp.put_i32_le(self.baseline_a_mm);
14821        __tmp.put_i32_le(self.baseline_b_mm);
14822        __tmp.put_i32_le(self.baseline_c_mm);
14823        __tmp.put_u32_le(self.accuracy);
14824        __tmp.put_i32_le(self.iar_num_hypotheses);
14825        __tmp.put_u16_le(self.wn);
14826        __tmp.put_u8(self.rtk_receiver_id);
14827        __tmp.put_u8(self.rtk_health);
14828        __tmp.put_u8(self.rtk_rate);
14829        __tmp.put_u8(self.nsats);
14830        __tmp.put_u8(self.baseline_coords_type as u8);
14831        if matches!(version, MavlinkVersion::V2) {
14832            let len = __tmp.len();
14833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14834        } else {
14835            __tmp.len()
14836        }
14837    }
14838}
14839#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14840#[doc = ""]
14841#[doc = "ID: 49"]
14842#[derive(Debug, Clone, PartialEq)]
14843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14845#[cfg_attr(feature = "ts", derive(TS))]
14846#[cfg_attr(feature = "ts", ts(export))]
14847pub struct GPS_GLOBAL_ORIGIN_DATA {
14848    #[doc = "Latitude (WGS84)"]
14849    pub latitude: i32,
14850    #[doc = "Longitude (WGS84)"]
14851    pub longitude: i32,
14852    #[doc = "Altitude (MSL). Positive for up."]
14853    pub altitude: i32,
14854    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14856    pub time_usec: u64,
14857}
14858impl GPS_GLOBAL_ORIGIN_DATA {
14859    pub const ENCODED_LEN: usize = 20usize;
14860    pub const DEFAULT: Self = Self {
14861        latitude: 0_i32,
14862        longitude: 0_i32,
14863        altitude: 0_i32,
14864        time_usec: 0_u64,
14865    };
14866    #[cfg(feature = "arbitrary")]
14867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14868        use arbitrary::{Arbitrary, Unstructured};
14869        let mut buf = [0u8; 1024];
14870        rng.fill_bytes(&mut buf);
14871        let mut unstructured = Unstructured::new(&buf);
14872        Self::arbitrary(&mut unstructured).unwrap_or_default()
14873    }
14874}
14875impl Default for GPS_GLOBAL_ORIGIN_DATA {
14876    fn default() -> Self {
14877        Self::DEFAULT.clone()
14878    }
14879}
14880impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14881    type Message = MavMessage;
14882    const ID: u32 = 49u32;
14883    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14884    const EXTRA_CRC: u8 = 39u8;
14885    const ENCODED_LEN: usize = 20usize;
14886    fn deser(
14887        _version: MavlinkVersion,
14888        __input: &[u8],
14889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14890        let avail_len = __input.len();
14891        let mut payload_buf = [0; Self::ENCODED_LEN];
14892        let mut buf = if avail_len < Self::ENCODED_LEN {
14893            payload_buf[0..avail_len].copy_from_slice(__input);
14894            Bytes::new(&payload_buf)
14895        } else {
14896            Bytes::new(__input)
14897        };
14898        let mut __struct = Self::default();
14899        __struct.latitude = buf.get_i32_le();
14900        __struct.longitude = buf.get_i32_le();
14901        __struct.altitude = buf.get_i32_le();
14902        __struct.time_usec = buf.get_u64_le();
14903        Ok(__struct)
14904    }
14905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14906        let mut __tmp = BytesMut::new(bytes);
14907        #[allow(clippy::absurd_extreme_comparisons)]
14908        #[allow(unused_comparisons)]
14909        if __tmp.remaining() < Self::ENCODED_LEN {
14910            panic!(
14911                "buffer is too small (need {} bytes, but got {})",
14912                Self::ENCODED_LEN,
14913                __tmp.remaining(),
14914            )
14915        }
14916        __tmp.put_i32_le(self.latitude);
14917        __tmp.put_i32_le(self.longitude);
14918        __tmp.put_i32_le(self.altitude);
14919        if matches!(version, MavlinkVersion::V2) {
14920            __tmp.put_u64_le(self.time_usec);
14921            let len = __tmp.len();
14922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14923        } else {
14924            __tmp.len()
14925        }
14926    }
14927}
14928#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14929#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14930#[doc = ""]
14931#[doc = "ID: 123"]
14932#[derive(Debug, Clone, PartialEq)]
14933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14935#[cfg_attr(feature = "ts", derive(TS))]
14936#[cfg_attr(feature = "ts", ts(export))]
14937pub struct GPS_INJECT_DATA_DATA {
14938    #[doc = "System ID"]
14939    pub target_system: u8,
14940    #[doc = "Component ID"]
14941    pub target_component: u8,
14942    #[doc = "Data length"]
14943    pub len: u8,
14944    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14947    pub data: [u8; 110],
14948}
14949impl GPS_INJECT_DATA_DATA {
14950    pub const ENCODED_LEN: usize = 113usize;
14951    pub const DEFAULT: Self = Self {
14952        target_system: 0_u8,
14953        target_component: 0_u8,
14954        len: 0_u8,
14955        data: [0_u8; 110usize],
14956    };
14957    #[cfg(feature = "arbitrary")]
14958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14959        use arbitrary::{Arbitrary, Unstructured};
14960        let mut buf = [0u8; 1024];
14961        rng.fill_bytes(&mut buf);
14962        let mut unstructured = Unstructured::new(&buf);
14963        Self::arbitrary(&mut unstructured).unwrap_or_default()
14964    }
14965}
14966impl Default for GPS_INJECT_DATA_DATA {
14967    fn default() -> Self {
14968        Self::DEFAULT.clone()
14969    }
14970}
14971impl MessageData for GPS_INJECT_DATA_DATA {
14972    type Message = MavMessage;
14973    const ID: u32 = 123u32;
14974    const NAME: &'static str = "GPS_INJECT_DATA";
14975    const EXTRA_CRC: u8 = 250u8;
14976    const ENCODED_LEN: usize = 113usize;
14977    fn deser(
14978        _version: MavlinkVersion,
14979        __input: &[u8],
14980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14981        let avail_len = __input.len();
14982        let mut payload_buf = [0; Self::ENCODED_LEN];
14983        let mut buf = if avail_len < Self::ENCODED_LEN {
14984            payload_buf[0..avail_len].copy_from_slice(__input);
14985            Bytes::new(&payload_buf)
14986        } else {
14987            Bytes::new(__input)
14988        };
14989        let mut __struct = Self::default();
14990        __struct.target_system = buf.get_u8();
14991        __struct.target_component = buf.get_u8();
14992        __struct.len = buf.get_u8();
14993        for v in &mut __struct.data {
14994            let val = buf.get_u8();
14995            *v = val;
14996        }
14997        Ok(__struct)
14998    }
14999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15000        let mut __tmp = BytesMut::new(bytes);
15001        #[allow(clippy::absurd_extreme_comparisons)]
15002        #[allow(unused_comparisons)]
15003        if __tmp.remaining() < Self::ENCODED_LEN {
15004            panic!(
15005                "buffer is too small (need {} bytes, but got {})",
15006                Self::ENCODED_LEN,
15007                __tmp.remaining(),
15008            )
15009        }
15010        __tmp.put_u8(self.target_system);
15011        __tmp.put_u8(self.target_component);
15012        __tmp.put_u8(self.len);
15013        for val in &self.data {
15014            __tmp.put_u8(*val);
15015        }
15016        if matches!(version, MavlinkVersion::V2) {
15017            let len = __tmp.len();
15018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15019        } else {
15020            __tmp.len()
15021        }
15022    }
15023}
15024#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15025#[doc = ""]
15026#[doc = "ID: 232"]
15027#[derive(Debug, Clone, PartialEq)]
15028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15030#[cfg_attr(feature = "ts", derive(TS))]
15031#[cfg_attr(feature = "ts", ts(export))]
15032pub struct GPS_INPUT_DATA {
15033    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15034    pub time_usec: u64,
15035    #[doc = "GPS time (from start of GPS week)"]
15036    pub time_week_ms: u32,
15037    #[doc = "Latitude (WGS84)"]
15038    pub lat: i32,
15039    #[doc = "Longitude (WGS84)"]
15040    pub lon: i32,
15041    #[doc = "Altitude (MSL). Positive for up."]
15042    pub alt: f32,
15043    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15044    pub hdop: f32,
15045    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15046    pub vdop: f32,
15047    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15048    pub vn: f32,
15049    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15050    pub ve: f32,
15051    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15052    pub vd: f32,
15053    #[doc = "GPS speed accuracy"]
15054    pub speed_accuracy: f32,
15055    #[doc = "GPS horizontal accuracy"]
15056    pub horiz_accuracy: f32,
15057    #[doc = "GPS vertical accuracy"]
15058    pub vert_accuracy: f32,
15059    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15060    pub ignore_flags: GpsInputIgnoreFlags,
15061    #[doc = "GPS week number"]
15062    pub time_week: u16,
15063    #[doc = "ID of the GPS for multiple GPS inputs"]
15064    pub gps_id: u8,
15065    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15066    pub fix_type: u8,
15067    #[doc = "Number of satellites visible."]
15068    pub satellites_visible: u8,
15069    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15070    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15071    pub yaw: u16,
15072}
15073impl GPS_INPUT_DATA {
15074    pub const ENCODED_LEN: usize = 65usize;
15075    pub const DEFAULT: Self = Self {
15076        time_usec: 0_u64,
15077        time_week_ms: 0_u32,
15078        lat: 0_i32,
15079        lon: 0_i32,
15080        alt: 0.0_f32,
15081        hdop: 0.0_f32,
15082        vdop: 0.0_f32,
15083        vn: 0.0_f32,
15084        ve: 0.0_f32,
15085        vd: 0.0_f32,
15086        speed_accuracy: 0.0_f32,
15087        horiz_accuracy: 0.0_f32,
15088        vert_accuracy: 0.0_f32,
15089        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15090        time_week: 0_u16,
15091        gps_id: 0_u8,
15092        fix_type: 0_u8,
15093        satellites_visible: 0_u8,
15094        yaw: 0_u16,
15095    };
15096    #[cfg(feature = "arbitrary")]
15097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15098        use arbitrary::{Arbitrary, Unstructured};
15099        let mut buf = [0u8; 1024];
15100        rng.fill_bytes(&mut buf);
15101        let mut unstructured = Unstructured::new(&buf);
15102        Self::arbitrary(&mut unstructured).unwrap_or_default()
15103    }
15104}
15105impl Default for GPS_INPUT_DATA {
15106    fn default() -> Self {
15107        Self::DEFAULT.clone()
15108    }
15109}
15110impl MessageData for GPS_INPUT_DATA {
15111    type Message = MavMessage;
15112    const ID: u32 = 232u32;
15113    const NAME: &'static str = "GPS_INPUT";
15114    const EXTRA_CRC: u8 = 151u8;
15115    const ENCODED_LEN: usize = 65usize;
15116    fn deser(
15117        _version: MavlinkVersion,
15118        __input: &[u8],
15119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15120        let avail_len = __input.len();
15121        let mut payload_buf = [0; Self::ENCODED_LEN];
15122        let mut buf = if avail_len < Self::ENCODED_LEN {
15123            payload_buf[0..avail_len].copy_from_slice(__input);
15124            Bytes::new(&payload_buf)
15125        } else {
15126            Bytes::new(__input)
15127        };
15128        let mut __struct = Self::default();
15129        __struct.time_usec = buf.get_u64_le();
15130        __struct.time_week_ms = buf.get_u32_le();
15131        __struct.lat = buf.get_i32_le();
15132        __struct.lon = buf.get_i32_le();
15133        __struct.alt = buf.get_f32_le();
15134        __struct.hdop = buf.get_f32_le();
15135        __struct.vdop = buf.get_f32_le();
15136        __struct.vn = buf.get_f32_le();
15137        __struct.ve = buf.get_f32_le();
15138        __struct.vd = buf.get_f32_le();
15139        __struct.speed_accuracy = buf.get_f32_le();
15140        __struct.horiz_accuracy = buf.get_f32_le();
15141        __struct.vert_accuracy = buf.get_f32_le();
15142        let tmp = buf.get_u16_le();
15143        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(tmp).ok_or(
15144            ::mavlink_core::error::ParserError::InvalidFlag {
15145                flag_type: "GpsInputIgnoreFlags",
15146                value: tmp as u64,
15147            },
15148        )?;
15149        __struct.time_week = buf.get_u16_le();
15150        __struct.gps_id = buf.get_u8();
15151        __struct.fix_type = buf.get_u8();
15152        __struct.satellites_visible = buf.get_u8();
15153        __struct.yaw = buf.get_u16_le();
15154        Ok(__struct)
15155    }
15156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15157        let mut __tmp = BytesMut::new(bytes);
15158        #[allow(clippy::absurd_extreme_comparisons)]
15159        #[allow(unused_comparisons)]
15160        if __tmp.remaining() < Self::ENCODED_LEN {
15161            panic!(
15162                "buffer is too small (need {} bytes, but got {})",
15163                Self::ENCODED_LEN,
15164                __tmp.remaining(),
15165            )
15166        }
15167        __tmp.put_u64_le(self.time_usec);
15168        __tmp.put_u32_le(self.time_week_ms);
15169        __tmp.put_i32_le(self.lat);
15170        __tmp.put_i32_le(self.lon);
15171        __tmp.put_f32_le(self.alt);
15172        __tmp.put_f32_le(self.hdop);
15173        __tmp.put_f32_le(self.vdop);
15174        __tmp.put_f32_le(self.vn);
15175        __tmp.put_f32_le(self.ve);
15176        __tmp.put_f32_le(self.vd);
15177        __tmp.put_f32_le(self.speed_accuracy);
15178        __tmp.put_f32_le(self.horiz_accuracy);
15179        __tmp.put_f32_le(self.vert_accuracy);
15180        __tmp.put_u16_le(self.ignore_flags.bits());
15181        __tmp.put_u16_le(self.time_week);
15182        __tmp.put_u8(self.gps_id);
15183        __tmp.put_u8(self.fix_type);
15184        __tmp.put_u8(self.satellites_visible);
15185        if matches!(version, MavlinkVersion::V2) {
15186            __tmp.put_u16_le(self.yaw);
15187            let len = __tmp.len();
15188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15189        } else {
15190            __tmp.len()
15191        }
15192    }
15193}
15194#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15195#[doc = ""]
15196#[doc = "ID: 24"]
15197#[derive(Debug, Clone, PartialEq)]
15198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15200#[cfg_attr(feature = "ts", derive(TS))]
15201#[cfg_attr(feature = "ts", ts(export))]
15202pub struct GPS_RAW_INT_DATA {
15203    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15204    pub time_usec: u64,
15205    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15206    pub lat: i32,
15207    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15208    pub lon: i32,
15209    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15210    pub alt: i32,
15211    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15212    pub eph: u16,
15213    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15214    pub epv: u16,
15215    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15216    pub vel: u16,
15217    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15218    pub cog: u16,
15219    #[doc = "GPS fix type."]
15220    pub fix_type: GpsFixType,
15221    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15222    pub satellites_visible: u8,
15223    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15225    pub alt_ellipsoid: i32,
15226    #[doc = "Position uncertainty."]
15227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15228    pub h_acc: u32,
15229    #[doc = "Altitude uncertainty."]
15230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15231    pub v_acc: u32,
15232    #[doc = "Speed uncertainty."]
15233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15234    pub vel_acc: u32,
15235    #[doc = "Heading / track uncertainty"]
15236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15237    pub hdg_acc: u32,
15238    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15240    pub yaw: u16,
15241}
15242impl GPS_RAW_INT_DATA {
15243    pub const ENCODED_LEN: usize = 52usize;
15244    pub const DEFAULT: Self = Self {
15245        time_usec: 0_u64,
15246        lat: 0_i32,
15247        lon: 0_i32,
15248        alt: 0_i32,
15249        eph: 0_u16,
15250        epv: 0_u16,
15251        vel: 0_u16,
15252        cog: 0_u16,
15253        fix_type: GpsFixType::DEFAULT,
15254        satellites_visible: 0_u8,
15255        alt_ellipsoid: 0_i32,
15256        h_acc: 0_u32,
15257        v_acc: 0_u32,
15258        vel_acc: 0_u32,
15259        hdg_acc: 0_u32,
15260        yaw: 0_u16,
15261    };
15262    #[cfg(feature = "arbitrary")]
15263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15264        use arbitrary::{Arbitrary, Unstructured};
15265        let mut buf = [0u8; 1024];
15266        rng.fill_bytes(&mut buf);
15267        let mut unstructured = Unstructured::new(&buf);
15268        Self::arbitrary(&mut unstructured).unwrap_or_default()
15269    }
15270}
15271impl Default for GPS_RAW_INT_DATA {
15272    fn default() -> Self {
15273        Self::DEFAULT.clone()
15274    }
15275}
15276impl MessageData for GPS_RAW_INT_DATA {
15277    type Message = MavMessage;
15278    const ID: u32 = 24u32;
15279    const NAME: &'static str = "GPS_RAW_INT";
15280    const EXTRA_CRC: u8 = 24u8;
15281    const ENCODED_LEN: usize = 52usize;
15282    fn deser(
15283        _version: MavlinkVersion,
15284        __input: &[u8],
15285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15286        let avail_len = __input.len();
15287        let mut payload_buf = [0; Self::ENCODED_LEN];
15288        let mut buf = if avail_len < Self::ENCODED_LEN {
15289            payload_buf[0..avail_len].copy_from_slice(__input);
15290            Bytes::new(&payload_buf)
15291        } else {
15292            Bytes::new(__input)
15293        };
15294        let mut __struct = Self::default();
15295        __struct.time_usec = buf.get_u64_le();
15296        __struct.lat = buf.get_i32_le();
15297        __struct.lon = buf.get_i32_le();
15298        __struct.alt = buf.get_i32_le();
15299        __struct.eph = buf.get_u16_le();
15300        __struct.epv = buf.get_u16_le();
15301        __struct.vel = buf.get_u16_le();
15302        __struct.cog = buf.get_u16_le();
15303        let tmp = buf.get_u8();
15304        __struct.fix_type =
15305            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15306                enum_type: "GpsFixType",
15307                value: tmp as u64,
15308            })?;
15309        __struct.satellites_visible = buf.get_u8();
15310        __struct.alt_ellipsoid = buf.get_i32_le();
15311        __struct.h_acc = buf.get_u32_le();
15312        __struct.v_acc = buf.get_u32_le();
15313        __struct.vel_acc = buf.get_u32_le();
15314        __struct.hdg_acc = buf.get_u32_le();
15315        __struct.yaw = buf.get_u16_le();
15316        Ok(__struct)
15317    }
15318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15319        let mut __tmp = BytesMut::new(bytes);
15320        #[allow(clippy::absurd_extreme_comparisons)]
15321        #[allow(unused_comparisons)]
15322        if __tmp.remaining() < Self::ENCODED_LEN {
15323            panic!(
15324                "buffer is too small (need {} bytes, but got {})",
15325                Self::ENCODED_LEN,
15326                __tmp.remaining(),
15327            )
15328        }
15329        __tmp.put_u64_le(self.time_usec);
15330        __tmp.put_i32_le(self.lat);
15331        __tmp.put_i32_le(self.lon);
15332        __tmp.put_i32_le(self.alt);
15333        __tmp.put_u16_le(self.eph);
15334        __tmp.put_u16_le(self.epv);
15335        __tmp.put_u16_le(self.vel);
15336        __tmp.put_u16_le(self.cog);
15337        __tmp.put_u8(self.fix_type as u8);
15338        __tmp.put_u8(self.satellites_visible);
15339        if matches!(version, MavlinkVersion::V2) {
15340            __tmp.put_i32_le(self.alt_ellipsoid);
15341            __tmp.put_u32_le(self.h_acc);
15342            __tmp.put_u32_le(self.v_acc);
15343            __tmp.put_u32_le(self.vel_acc);
15344            __tmp.put_u32_le(self.hdg_acc);
15345            __tmp.put_u16_le(self.yaw);
15346            let len = __tmp.len();
15347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15348        } else {
15349            __tmp.len()
15350        }
15351    }
15352}
15353#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15354#[doc = ""]
15355#[doc = "ID: 233"]
15356#[derive(Debug, Clone, PartialEq)]
15357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15359#[cfg_attr(feature = "ts", derive(TS))]
15360#[cfg_attr(feature = "ts", ts(export))]
15361pub struct GPS_RTCM_DATA_DATA {
15362    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15363    pub flags: u8,
15364    #[doc = "data length"]
15365    pub len: u8,
15366    #[doc = "RTCM message (may be fragmented)"]
15367    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15368    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15369    pub data: [u8; 180],
15370}
15371impl GPS_RTCM_DATA_DATA {
15372    pub const ENCODED_LEN: usize = 182usize;
15373    pub const DEFAULT: Self = Self {
15374        flags: 0_u8,
15375        len: 0_u8,
15376        data: [0_u8; 180usize],
15377    };
15378    #[cfg(feature = "arbitrary")]
15379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15380        use arbitrary::{Arbitrary, Unstructured};
15381        let mut buf = [0u8; 1024];
15382        rng.fill_bytes(&mut buf);
15383        let mut unstructured = Unstructured::new(&buf);
15384        Self::arbitrary(&mut unstructured).unwrap_or_default()
15385    }
15386}
15387impl Default for GPS_RTCM_DATA_DATA {
15388    fn default() -> Self {
15389        Self::DEFAULT.clone()
15390    }
15391}
15392impl MessageData for GPS_RTCM_DATA_DATA {
15393    type Message = MavMessage;
15394    const ID: u32 = 233u32;
15395    const NAME: &'static str = "GPS_RTCM_DATA";
15396    const EXTRA_CRC: u8 = 35u8;
15397    const ENCODED_LEN: usize = 182usize;
15398    fn deser(
15399        _version: MavlinkVersion,
15400        __input: &[u8],
15401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15402        let avail_len = __input.len();
15403        let mut payload_buf = [0; Self::ENCODED_LEN];
15404        let mut buf = if avail_len < Self::ENCODED_LEN {
15405            payload_buf[0..avail_len].copy_from_slice(__input);
15406            Bytes::new(&payload_buf)
15407        } else {
15408            Bytes::new(__input)
15409        };
15410        let mut __struct = Self::default();
15411        __struct.flags = buf.get_u8();
15412        __struct.len = buf.get_u8();
15413        for v in &mut __struct.data {
15414            let val = buf.get_u8();
15415            *v = val;
15416        }
15417        Ok(__struct)
15418    }
15419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15420        let mut __tmp = BytesMut::new(bytes);
15421        #[allow(clippy::absurd_extreme_comparisons)]
15422        #[allow(unused_comparisons)]
15423        if __tmp.remaining() < Self::ENCODED_LEN {
15424            panic!(
15425                "buffer is too small (need {} bytes, but got {})",
15426                Self::ENCODED_LEN,
15427                __tmp.remaining(),
15428            )
15429        }
15430        __tmp.put_u8(self.flags);
15431        __tmp.put_u8(self.len);
15432        for val in &self.data {
15433            __tmp.put_u8(*val);
15434        }
15435        if matches!(version, MavlinkVersion::V2) {
15436            let len = __tmp.len();
15437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15438        } else {
15439            __tmp.len()
15440        }
15441    }
15442}
15443#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15444#[doc = ""]
15445#[doc = "ID: 127"]
15446#[derive(Debug, Clone, PartialEq)]
15447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15449#[cfg_attr(feature = "ts", derive(TS))]
15450#[cfg_attr(feature = "ts", ts(export))]
15451pub struct GPS_RTK_DATA {
15452    #[doc = "Time since boot of last baseline message received."]
15453    pub time_last_baseline_ms: u32,
15454    #[doc = "GPS Time of Week of last baseline"]
15455    pub tow: u32,
15456    #[doc = "Current baseline in ECEF x or NED north component."]
15457    pub baseline_a_mm: i32,
15458    #[doc = "Current baseline in ECEF y or NED east component."]
15459    pub baseline_b_mm: i32,
15460    #[doc = "Current baseline in ECEF z or NED down component."]
15461    pub baseline_c_mm: i32,
15462    #[doc = "Current estimate of baseline accuracy."]
15463    pub accuracy: u32,
15464    #[doc = "Current number of integer ambiguity hypotheses."]
15465    pub iar_num_hypotheses: i32,
15466    #[doc = "GPS Week Number of last baseline"]
15467    pub wn: u16,
15468    #[doc = "Identification of connected RTK receiver."]
15469    pub rtk_receiver_id: u8,
15470    #[doc = "GPS-specific health report for RTK data."]
15471    pub rtk_health: u8,
15472    #[doc = "Rate of baseline messages being received by GPS"]
15473    pub rtk_rate: u8,
15474    #[doc = "Current number of sats used for RTK calculation."]
15475    pub nsats: u8,
15476    #[doc = "Coordinate system of baseline"]
15477    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15478}
15479impl GPS_RTK_DATA {
15480    pub const ENCODED_LEN: usize = 35usize;
15481    pub const DEFAULT: Self = Self {
15482        time_last_baseline_ms: 0_u32,
15483        tow: 0_u32,
15484        baseline_a_mm: 0_i32,
15485        baseline_b_mm: 0_i32,
15486        baseline_c_mm: 0_i32,
15487        accuracy: 0_u32,
15488        iar_num_hypotheses: 0_i32,
15489        wn: 0_u16,
15490        rtk_receiver_id: 0_u8,
15491        rtk_health: 0_u8,
15492        rtk_rate: 0_u8,
15493        nsats: 0_u8,
15494        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15495    };
15496    #[cfg(feature = "arbitrary")]
15497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15498        use arbitrary::{Arbitrary, Unstructured};
15499        let mut buf = [0u8; 1024];
15500        rng.fill_bytes(&mut buf);
15501        let mut unstructured = Unstructured::new(&buf);
15502        Self::arbitrary(&mut unstructured).unwrap_or_default()
15503    }
15504}
15505impl Default for GPS_RTK_DATA {
15506    fn default() -> Self {
15507        Self::DEFAULT.clone()
15508    }
15509}
15510impl MessageData for GPS_RTK_DATA {
15511    type Message = MavMessage;
15512    const ID: u32 = 127u32;
15513    const NAME: &'static str = "GPS_RTK";
15514    const EXTRA_CRC: u8 = 25u8;
15515    const ENCODED_LEN: usize = 35usize;
15516    fn deser(
15517        _version: MavlinkVersion,
15518        __input: &[u8],
15519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15520        let avail_len = __input.len();
15521        let mut payload_buf = [0; Self::ENCODED_LEN];
15522        let mut buf = if avail_len < Self::ENCODED_LEN {
15523            payload_buf[0..avail_len].copy_from_slice(__input);
15524            Bytes::new(&payload_buf)
15525        } else {
15526            Bytes::new(__input)
15527        };
15528        let mut __struct = Self::default();
15529        __struct.time_last_baseline_ms = buf.get_u32_le();
15530        __struct.tow = buf.get_u32_le();
15531        __struct.baseline_a_mm = buf.get_i32_le();
15532        __struct.baseline_b_mm = buf.get_i32_le();
15533        __struct.baseline_c_mm = buf.get_i32_le();
15534        __struct.accuracy = buf.get_u32_le();
15535        __struct.iar_num_hypotheses = buf.get_i32_le();
15536        __struct.wn = buf.get_u16_le();
15537        __struct.rtk_receiver_id = buf.get_u8();
15538        __struct.rtk_health = buf.get_u8();
15539        __struct.rtk_rate = buf.get_u8();
15540        __struct.nsats = buf.get_u8();
15541        let tmp = buf.get_u8();
15542        __struct.baseline_coords_type =
15543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15544                enum_type: "RtkBaselineCoordinateSystem",
15545                value: tmp as u64,
15546            })?;
15547        Ok(__struct)
15548    }
15549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15550        let mut __tmp = BytesMut::new(bytes);
15551        #[allow(clippy::absurd_extreme_comparisons)]
15552        #[allow(unused_comparisons)]
15553        if __tmp.remaining() < Self::ENCODED_LEN {
15554            panic!(
15555                "buffer is too small (need {} bytes, but got {})",
15556                Self::ENCODED_LEN,
15557                __tmp.remaining(),
15558            )
15559        }
15560        __tmp.put_u32_le(self.time_last_baseline_ms);
15561        __tmp.put_u32_le(self.tow);
15562        __tmp.put_i32_le(self.baseline_a_mm);
15563        __tmp.put_i32_le(self.baseline_b_mm);
15564        __tmp.put_i32_le(self.baseline_c_mm);
15565        __tmp.put_u32_le(self.accuracy);
15566        __tmp.put_i32_le(self.iar_num_hypotheses);
15567        __tmp.put_u16_le(self.wn);
15568        __tmp.put_u8(self.rtk_receiver_id);
15569        __tmp.put_u8(self.rtk_health);
15570        __tmp.put_u8(self.rtk_rate);
15571        __tmp.put_u8(self.nsats);
15572        __tmp.put_u8(self.baseline_coords_type as u8);
15573        if matches!(version, MavlinkVersion::V2) {
15574            let len = __tmp.len();
15575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15576        } else {
15577            __tmp.len()
15578        }
15579    }
15580}
15581#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15582#[doc = ""]
15583#[doc = "ID: 25"]
15584#[derive(Debug, Clone, PartialEq)]
15585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15587#[cfg_attr(feature = "ts", derive(TS))]
15588#[cfg_attr(feature = "ts", ts(export))]
15589pub struct GPS_STATUS_DATA {
15590    #[doc = "Number of satellites visible"]
15591    pub satellites_visible: u8,
15592    #[doc = "Global satellite ID"]
15593    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15594    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15595    pub satellite_prn: [u8; 20],
15596    #[doc = "0: Satellite not used, 1: used for localization"]
15597    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15598    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15599    pub satellite_used: [u8; 20],
15600    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15603    pub satellite_elevation: [u8; 20],
15604    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15607    pub satellite_azimuth: [u8; 20],
15608    #[doc = "Signal to noise ratio of satellite"]
15609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15611    pub satellite_snr: [u8; 20],
15612}
15613impl GPS_STATUS_DATA {
15614    pub const ENCODED_LEN: usize = 101usize;
15615    pub const DEFAULT: Self = Self {
15616        satellites_visible: 0_u8,
15617        satellite_prn: [0_u8; 20usize],
15618        satellite_used: [0_u8; 20usize],
15619        satellite_elevation: [0_u8; 20usize],
15620        satellite_azimuth: [0_u8; 20usize],
15621        satellite_snr: [0_u8; 20usize],
15622    };
15623    #[cfg(feature = "arbitrary")]
15624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15625        use arbitrary::{Arbitrary, Unstructured};
15626        let mut buf = [0u8; 1024];
15627        rng.fill_bytes(&mut buf);
15628        let mut unstructured = Unstructured::new(&buf);
15629        Self::arbitrary(&mut unstructured).unwrap_or_default()
15630    }
15631}
15632impl Default for GPS_STATUS_DATA {
15633    fn default() -> Self {
15634        Self::DEFAULT.clone()
15635    }
15636}
15637impl MessageData for GPS_STATUS_DATA {
15638    type Message = MavMessage;
15639    const ID: u32 = 25u32;
15640    const NAME: &'static str = "GPS_STATUS";
15641    const EXTRA_CRC: u8 = 23u8;
15642    const ENCODED_LEN: usize = 101usize;
15643    fn deser(
15644        _version: MavlinkVersion,
15645        __input: &[u8],
15646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15647        let avail_len = __input.len();
15648        let mut payload_buf = [0; Self::ENCODED_LEN];
15649        let mut buf = if avail_len < Self::ENCODED_LEN {
15650            payload_buf[0..avail_len].copy_from_slice(__input);
15651            Bytes::new(&payload_buf)
15652        } else {
15653            Bytes::new(__input)
15654        };
15655        let mut __struct = Self::default();
15656        __struct.satellites_visible = buf.get_u8();
15657        for v in &mut __struct.satellite_prn {
15658            let val = buf.get_u8();
15659            *v = val;
15660        }
15661        for v in &mut __struct.satellite_used {
15662            let val = buf.get_u8();
15663            *v = val;
15664        }
15665        for v in &mut __struct.satellite_elevation {
15666            let val = buf.get_u8();
15667            *v = val;
15668        }
15669        for v in &mut __struct.satellite_azimuth {
15670            let val = buf.get_u8();
15671            *v = val;
15672        }
15673        for v in &mut __struct.satellite_snr {
15674            let val = buf.get_u8();
15675            *v = val;
15676        }
15677        Ok(__struct)
15678    }
15679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15680        let mut __tmp = BytesMut::new(bytes);
15681        #[allow(clippy::absurd_extreme_comparisons)]
15682        #[allow(unused_comparisons)]
15683        if __tmp.remaining() < Self::ENCODED_LEN {
15684            panic!(
15685                "buffer is too small (need {} bytes, but got {})",
15686                Self::ENCODED_LEN,
15687                __tmp.remaining(),
15688            )
15689        }
15690        __tmp.put_u8(self.satellites_visible);
15691        for val in &self.satellite_prn {
15692            __tmp.put_u8(*val);
15693        }
15694        for val in &self.satellite_used {
15695            __tmp.put_u8(*val);
15696        }
15697        for val in &self.satellite_elevation {
15698            __tmp.put_u8(*val);
15699        }
15700        for val in &self.satellite_azimuth {
15701            __tmp.put_u8(*val);
15702        }
15703        for val in &self.satellite_snr {
15704            __tmp.put_u8(*val);
15705        }
15706        if matches!(version, MavlinkVersion::V2) {
15707            let len = __tmp.len();
15708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15709        } else {
15710            __tmp.len()
15711        }
15712    }
15713}
15714#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15715#[doc = ""]
15716#[doc = "ID: 0"]
15717#[derive(Debug, Clone, PartialEq)]
15718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15720#[cfg_attr(feature = "ts", derive(TS))]
15721#[cfg_attr(feature = "ts", ts(export))]
15722pub struct HEARTBEAT_DATA {
15723    #[doc = "A bitfield for use for autopilot-specific flags"]
15724    pub custom_mode: u32,
15725    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15726    pub mavtype: MavType,
15727    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15728    pub autopilot: MavAutopilot,
15729    #[doc = "System mode bitmap."]
15730    pub base_mode: MavModeFlag,
15731    #[doc = "System status flag."]
15732    pub system_status: MavState,
15733    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15734    pub mavlink_version: u8,
15735}
15736impl HEARTBEAT_DATA {
15737    pub const ENCODED_LEN: usize = 9usize;
15738    pub const DEFAULT: Self = Self {
15739        custom_mode: 0_u32,
15740        mavtype: MavType::DEFAULT,
15741        autopilot: MavAutopilot::DEFAULT,
15742        base_mode: MavModeFlag::DEFAULT,
15743        system_status: MavState::DEFAULT,
15744        mavlink_version: MINOR_MAVLINK_VERSION,
15745    };
15746    #[cfg(feature = "arbitrary")]
15747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15748        use arbitrary::{Arbitrary, Unstructured};
15749        let mut buf = [0u8; 1024];
15750        rng.fill_bytes(&mut buf);
15751        let mut unstructured = Unstructured::new(&buf);
15752        Self::arbitrary(&mut unstructured).unwrap_or_default()
15753    }
15754}
15755impl Default for HEARTBEAT_DATA {
15756    fn default() -> Self {
15757        Self::DEFAULT.clone()
15758    }
15759}
15760impl MessageData for HEARTBEAT_DATA {
15761    type Message = MavMessage;
15762    const ID: u32 = 0u32;
15763    const NAME: &'static str = "HEARTBEAT";
15764    const EXTRA_CRC: u8 = 50u8;
15765    const ENCODED_LEN: usize = 9usize;
15766    fn deser(
15767        _version: MavlinkVersion,
15768        __input: &[u8],
15769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15770        let avail_len = __input.len();
15771        let mut payload_buf = [0; Self::ENCODED_LEN];
15772        let mut buf = if avail_len < Self::ENCODED_LEN {
15773            payload_buf[0..avail_len].copy_from_slice(__input);
15774            Bytes::new(&payload_buf)
15775        } else {
15776            Bytes::new(__input)
15777        };
15778        let mut __struct = Self::default();
15779        __struct.custom_mode = buf.get_u32_le();
15780        let tmp = buf.get_u8();
15781        __struct.mavtype =
15782            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15783                enum_type: "MavType",
15784                value: tmp as u64,
15785            })?;
15786        let tmp = buf.get_u8();
15787        __struct.autopilot =
15788            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15789                enum_type: "MavAutopilot",
15790                value: tmp as u64,
15791            })?;
15792        let tmp = buf.get_u8();
15793        __struct.base_mode =
15794            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15795                flag_type: "MavModeFlag",
15796                value: tmp as u64,
15797            })?;
15798        let tmp = buf.get_u8();
15799        __struct.system_status =
15800            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15801                enum_type: "MavState",
15802                value: tmp as u64,
15803            })?;
15804        __struct.mavlink_version = buf.get_u8();
15805        Ok(__struct)
15806    }
15807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15808        let mut __tmp = BytesMut::new(bytes);
15809        #[allow(clippy::absurd_extreme_comparisons)]
15810        #[allow(unused_comparisons)]
15811        if __tmp.remaining() < Self::ENCODED_LEN {
15812            panic!(
15813                "buffer is too small (need {} bytes, but got {})",
15814                Self::ENCODED_LEN,
15815                __tmp.remaining(),
15816            )
15817        }
15818        __tmp.put_u32_le(self.custom_mode);
15819        __tmp.put_u8(self.mavtype as u8);
15820        __tmp.put_u8(self.autopilot as u8);
15821        __tmp.put_u8(self.base_mode.bits());
15822        __tmp.put_u8(self.system_status as u8);
15823        __tmp.put_u8(self.mavlink_version);
15824        if matches!(version, MavlinkVersion::V2) {
15825            let len = __tmp.len();
15826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15827        } else {
15828            __tmp.len()
15829        }
15830    }
15831}
15832#[doc = "The IMU readings in SI units in NED body frame."]
15833#[doc = ""]
15834#[doc = "ID: 105"]
15835#[derive(Debug, Clone, PartialEq)]
15836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15838#[cfg_attr(feature = "ts", derive(TS))]
15839#[cfg_attr(feature = "ts", ts(export))]
15840pub struct HIGHRES_IMU_DATA {
15841    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15842    pub time_usec: u64,
15843    #[doc = "X acceleration"]
15844    pub xacc: f32,
15845    #[doc = "Y acceleration"]
15846    pub yacc: f32,
15847    #[doc = "Z acceleration"]
15848    pub zacc: f32,
15849    #[doc = "Angular speed around X axis"]
15850    pub xgyro: f32,
15851    #[doc = "Angular speed around Y axis"]
15852    pub ygyro: f32,
15853    #[doc = "Angular speed around Z axis"]
15854    pub zgyro: f32,
15855    #[doc = "X Magnetic field"]
15856    pub xmag: f32,
15857    #[doc = "Y Magnetic field"]
15858    pub ymag: f32,
15859    #[doc = "Z Magnetic field"]
15860    pub zmag: f32,
15861    #[doc = "Absolute pressure"]
15862    pub abs_pressure: f32,
15863    #[doc = "Differential pressure"]
15864    pub diff_pressure: f32,
15865    #[doc = "Altitude calculated from pressure"]
15866    pub pressure_alt: f32,
15867    #[doc = "Temperature"]
15868    pub temperature: f32,
15869    #[doc = "Bitmap for fields that have updated since last message"]
15870    pub fields_updated: HighresImuUpdatedFlags,
15871    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15872    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15873    pub id: u8,
15874}
15875impl HIGHRES_IMU_DATA {
15876    pub const ENCODED_LEN: usize = 63usize;
15877    pub const DEFAULT: Self = Self {
15878        time_usec: 0_u64,
15879        xacc: 0.0_f32,
15880        yacc: 0.0_f32,
15881        zacc: 0.0_f32,
15882        xgyro: 0.0_f32,
15883        ygyro: 0.0_f32,
15884        zgyro: 0.0_f32,
15885        xmag: 0.0_f32,
15886        ymag: 0.0_f32,
15887        zmag: 0.0_f32,
15888        abs_pressure: 0.0_f32,
15889        diff_pressure: 0.0_f32,
15890        pressure_alt: 0.0_f32,
15891        temperature: 0.0_f32,
15892        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15893        id: 0_u8,
15894    };
15895    #[cfg(feature = "arbitrary")]
15896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15897        use arbitrary::{Arbitrary, Unstructured};
15898        let mut buf = [0u8; 1024];
15899        rng.fill_bytes(&mut buf);
15900        let mut unstructured = Unstructured::new(&buf);
15901        Self::arbitrary(&mut unstructured).unwrap_or_default()
15902    }
15903}
15904impl Default for HIGHRES_IMU_DATA {
15905    fn default() -> Self {
15906        Self::DEFAULT.clone()
15907    }
15908}
15909impl MessageData for HIGHRES_IMU_DATA {
15910    type Message = MavMessage;
15911    const ID: u32 = 105u32;
15912    const NAME: &'static str = "HIGHRES_IMU";
15913    const EXTRA_CRC: u8 = 93u8;
15914    const ENCODED_LEN: usize = 63usize;
15915    fn deser(
15916        _version: MavlinkVersion,
15917        __input: &[u8],
15918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15919        let avail_len = __input.len();
15920        let mut payload_buf = [0; Self::ENCODED_LEN];
15921        let mut buf = if avail_len < Self::ENCODED_LEN {
15922            payload_buf[0..avail_len].copy_from_slice(__input);
15923            Bytes::new(&payload_buf)
15924        } else {
15925            Bytes::new(__input)
15926        };
15927        let mut __struct = Self::default();
15928        __struct.time_usec = buf.get_u64_le();
15929        __struct.xacc = buf.get_f32_le();
15930        __struct.yacc = buf.get_f32_le();
15931        __struct.zacc = buf.get_f32_le();
15932        __struct.xgyro = buf.get_f32_le();
15933        __struct.ygyro = buf.get_f32_le();
15934        __struct.zgyro = buf.get_f32_le();
15935        __struct.xmag = buf.get_f32_le();
15936        __struct.ymag = buf.get_f32_le();
15937        __struct.zmag = buf.get_f32_le();
15938        __struct.abs_pressure = buf.get_f32_le();
15939        __struct.diff_pressure = buf.get_f32_le();
15940        __struct.pressure_alt = buf.get_f32_le();
15941        __struct.temperature = buf.get_f32_le();
15942        let tmp = buf.get_u16_le();
15943        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(tmp).ok_or(
15944            ::mavlink_core::error::ParserError::InvalidFlag {
15945                flag_type: "HighresImuUpdatedFlags",
15946                value: tmp as u64,
15947            },
15948        )?;
15949        __struct.id = buf.get_u8();
15950        Ok(__struct)
15951    }
15952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15953        let mut __tmp = BytesMut::new(bytes);
15954        #[allow(clippy::absurd_extreme_comparisons)]
15955        #[allow(unused_comparisons)]
15956        if __tmp.remaining() < Self::ENCODED_LEN {
15957            panic!(
15958                "buffer is too small (need {} bytes, but got {})",
15959                Self::ENCODED_LEN,
15960                __tmp.remaining(),
15961            )
15962        }
15963        __tmp.put_u64_le(self.time_usec);
15964        __tmp.put_f32_le(self.xacc);
15965        __tmp.put_f32_le(self.yacc);
15966        __tmp.put_f32_le(self.zacc);
15967        __tmp.put_f32_le(self.xgyro);
15968        __tmp.put_f32_le(self.ygyro);
15969        __tmp.put_f32_le(self.zgyro);
15970        __tmp.put_f32_le(self.xmag);
15971        __tmp.put_f32_le(self.ymag);
15972        __tmp.put_f32_le(self.zmag);
15973        __tmp.put_f32_le(self.abs_pressure);
15974        __tmp.put_f32_le(self.diff_pressure);
15975        __tmp.put_f32_le(self.pressure_alt);
15976        __tmp.put_f32_le(self.temperature);
15977        __tmp.put_u16_le(self.fields_updated.bits());
15978        if matches!(version, MavlinkVersion::V2) {
15979            __tmp.put_u8(self.id);
15980            let len = __tmp.len();
15981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15982        } else {
15983            __tmp.len()
15984        }
15985    }
15986}
15987#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15988#[doc = "Message appropriate for high latency connections like Iridium."]
15989#[doc = ""]
15990#[doc = "ID: 234"]
15991#[derive(Debug, Clone, PartialEq)]
15992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15994#[cfg_attr(feature = "ts", derive(TS))]
15995#[cfg_attr(feature = "ts", ts(export))]
15996pub struct HIGH_LATENCY_DATA {
15997    #[doc = "A bitfield for use for autopilot-specific flags."]
15998    pub custom_mode: u32,
15999    #[doc = "Latitude"]
16000    pub latitude: i32,
16001    #[doc = "Longitude"]
16002    pub longitude: i32,
16003    #[doc = "roll"]
16004    pub roll: i16,
16005    #[doc = "pitch"]
16006    pub pitch: i16,
16007    #[doc = "heading"]
16008    pub heading: u16,
16009    #[doc = "heading setpoint"]
16010    pub heading_sp: i16,
16011    #[doc = "Altitude above mean sea level"]
16012    pub altitude_amsl: i16,
16013    #[doc = "Altitude setpoint relative to the home position"]
16014    pub altitude_sp: i16,
16015    #[doc = "distance to target"]
16016    pub wp_distance: u16,
16017    #[doc = "Bitmap of enabled system modes."]
16018    pub base_mode: MavModeFlag,
16019    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16020    pub landed_state: MavLandedState,
16021    #[doc = "throttle (percentage)"]
16022    pub throttle: i8,
16023    #[doc = "airspeed"]
16024    pub airspeed: u8,
16025    #[doc = "airspeed setpoint"]
16026    pub airspeed_sp: u8,
16027    #[doc = "groundspeed"]
16028    pub groundspeed: u8,
16029    #[doc = "climb rate"]
16030    pub climb_rate: i8,
16031    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16032    pub gps_nsat: u8,
16033    #[doc = "GPS Fix type."]
16034    pub gps_fix_type: GpsFixType,
16035    #[doc = "Remaining battery (percentage)"]
16036    pub battery_remaining: u8,
16037    #[doc = "Autopilot temperature (degrees C)"]
16038    pub temperature: i8,
16039    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16040    pub temperature_air: i8,
16041    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16042    pub failsafe: u8,
16043    #[doc = "current waypoint number"]
16044    pub wp_num: u8,
16045}
16046impl HIGH_LATENCY_DATA {
16047    pub const ENCODED_LEN: usize = 40usize;
16048    pub const DEFAULT: Self = Self {
16049        custom_mode: 0_u32,
16050        latitude: 0_i32,
16051        longitude: 0_i32,
16052        roll: 0_i16,
16053        pitch: 0_i16,
16054        heading: 0_u16,
16055        heading_sp: 0_i16,
16056        altitude_amsl: 0_i16,
16057        altitude_sp: 0_i16,
16058        wp_distance: 0_u16,
16059        base_mode: MavModeFlag::DEFAULT,
16060        landed_state: MavLandedState::DEFAULT,
16061        throttle: 0_i8,
16062        airspeed: 0_u8,
16063        airspeed_sp: 0_u8,
16064        groundspeed: 0_u8,
16065        climb_rate: 0_i8,
16066        gps_nsat: 0_u8,
16067        gps_fix_type: GpsFixType::DEFAULT,
16068        battery_remaining: 0_u8,
16069        temperature: 0_i8,
16070        temperature_air: 0_i8,
16071        failsafe: 0_u8,
16072        wp_num: 0_u8,
16073    };
16074    #[cfg(feature = "arbitrary")]
16075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16076        use arbitrary::{Arbitrary, Unstructured};
16077        let mut buf = [0u8; 1024];
16078        rng.fill_bytes(&mut buf);
16079        let mut unstructured = Unstructured::new(&buf);
16080        Self::arbitrary(&mut unstructured).unwrap_or_default()
16081    }
16082}
16083impl Default for HIGH_LATENCY_DATA {
16084    fn default() -> Self {
16085        Self::DEFAULT.clone()
16086    }
16087}
16088impl MessageData for HIGH_LATENCY_DATA {
16089    type Message = MavMessage;
16090    const ID: u32 = 234u32;
16091    const NAME: &'static str = "HIGH_LATENCY";
16092    const EXTRA_CRC: u8 = 150u8;
16093    const ENCODED_LEN: usize = 40usize;
16094    fn deser(
16095        _version: MavlinkVersion,
16096        __input: &[u8],
16097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16098        let avail_len = __input.len();
16099        let mut payload_buf = [0; Self::ENCODED_LEN];
16100        let mut buf = if avail_len < Self::ENCODED_LEN {
16101            payload_buf[0..avail_len].copy_from_slice(__input);
16102            Bytes::new(&payload_buf)
16103        } else {
16104            Bytes::new(__input)
16105        };
16106        let mut __struct = Self::default();
16107        __struct.custom_mode = buf.get_u32_le();
16108        __struct.latitude = buf.get_i32_le();
16109        __struct.longitude = buf.get_i32_le();
16110        __struct.roll = buf.get_i16_le();
16111        __struct.pitch = buf.get_i16_le();
16112        __struct.heading = buf.get_u16_le();
16113        __struct.heading_sp = buf.get_i16_le();
16114        __struct.altitude_amsl = buf.get_i16_le();
16115        __struct.altitude_sp = buf.get_i16_le();
16116        __struct.wp_distance = buf.get_u16_le();
16117        let tmp = buf.get_u8();
16118        __struct.base_mode =
16119            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16120                flag_type: "MavModeFlag",
16121                value: tmp as u64,
16122            })?;
16123        let tmp = buf.get_u8();
16124        __struct.landed_state =
16125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16126                enum_type: "MavLandedState",
16127                value: tmp as u64,
16128            })?;
16129        __struct.throttle = buf.get_i8();
16130        __struct.airspeed = buf.get_u8();
16131        __struct.airspeed_sp = buf.get_u8();
16132        __struct.groundspeed = buf.get_u8();
16133        __struct.climb_rate = buf.get_i8();
16134        __struct.gps_nsat = buf.get_u8();
16135        let tmp = buf.get_u8();
16136        __struct.gps_fix_type =
16137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16138                enum_type: "GpsFixType",
16139                value: tmp as u64,
16140            })?;
16141        __struct.battery_remaining = buf.get_u8();
16142        __struct.temperature = buf.get_i8();
16143        __struct.temperature_air = buf.get_i8();
16144        __struct.failsafe = buf.get_u8();
16145        __struct.wp_num = buf.get_u8();
16146        Ok(__struct)
16147    }
16148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16149        let mut __tmp = BytesMut::new(bytes);
16150        #[allow(clippy::absurd_extreme_comparisons)]
16151        #[allow(unused_comparisons)]
16152        if __tmp.remaining() < Self::ENCODED_LEN {
16153            panic!(
16154                "buffer is too small (need {} bytes, but got {})",
16155                Self::ENCODED_LEN,
16156                __tmp.remaining(),
16157            )
16158        }
16159        __tmp.put_u32_le(self.custom_mode);
16160        __tmp.put_i32_le(self.latitude);
16161        __tmp.put_i32_le(self.longitude);
16162        __tmp.put_i16_le(self.roll);
16163        __tmp.put_i16_le(self.pitch);
16164        __tmp.put_u16_le(self.heading);
16165        __tmp.put_i16_le(self.heading_sp);
16166        __tmp.put_i16_le(self.altitude_amsl);
16167        __tmp.put_i16_le(self.altitude_sp);
16168        __tmp.put_u16_le(self.wp_distance);
16169        __tmp.put_u8(self.base_mode.bits());
16170        __tmp.put_u8(self.landed_state as u8);
16171        __tmp.put_i8(self.throttle);
16172        __tmp.put_u8(self.airspeed);
16173        __tmp.put_u8(self.airspeed_sp);
16174        __tmp.put_u8(self.groundspeed);
16175        __tmp.put_i8(self.climb_rate);
16176        __tmp.put_u8(self.gps_nsat);
16177        __tmp.put_u8(self.gps_fix_type as u8);
16178        __tmp.put_u8(self.battery_remaining);
16179        __tmp.put_i8(self.temperature);
16180        __tmp.put_i8(self.temperature_air);
16181        __tmp.put_u8(self.failsafe);
16182        __tmp.put_u8(self.wp_num);
16183        if matches!(version, MavlinkVersion::V2) {
16184            let len = __tmp.len();
16185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16186        } else {
16187            __tmp.len()
16188        }
16189    }
16190}
16191#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16192#[doc = ""]
16193#[doc = "ID: 235"]
16194#[derive(Debug, Clone, PartialEq)]
16195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16197#[cfg_attr(feature = "ts", derive(TS))]
16198#[cfg_attr(feature = "ts", ts(export))]
16199pub struct HIGH_LATENCY2_DATA {
16200    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16201    pub timestamp: u32,
16202    #[doc = "Latitude"]
16203    pub latitude: i32,
16204    #[doc = "Longitude"]
16205    pub longitude: i32,
16206    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16207    pub custom_mode: u16,
16208    #[doc = "Altitude above mean sea level"]
16209    pub altitude: i16,
16210    #[doc = "Altitude setpoint"]
16211    pub target_altitude: i16,
16212    #[doc = "Distance to target waypoint or position"]
16213    pub target_distance: u16,
16214    #[doc = "Current waypoint number"]
16215    pub wp_num: u16,
16216    #[doc = "Bitmap of failure flags."]
16217    pub failure_flags: HlFailureFlag,
16218    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16219    pub mavtype: MavType,
16220    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16221    pub autopilot: MavAutopilot,
16222    #[doc = "Heading"]
16223    pub heading: u8,
16224    #[doc = "Heading setpoint"]
16225    pub target_heading: u8,
16226    #[doc = "Throttle"]
16227    pub throttle: u8,
16228    #[doc = "Airspeed"]
16229    pub airspeed: u8,
16230    #[doc = "Airspeed setpoint"]
16231    pub airspeed_sp: u8,
16232    #[doc = "Groundspeed"]
16233    pub groundspeed: u8,
16234    #[doc = "Windspeed"]
16235    pub windspeed: u8,
16236    #[doc = "Wind heading"]
16237    pub wind_heading: u8,
16238    #[doc = "Maximum error horizontal position since last message"]
16239    pub eph: u8,
16240    #[doc = "Maximum error vertical position since last message"]
16241    pub epv: u8,
16242    #[doc = "Air temperature"]
16243    pub temperature_air: i8,
16244    #[doc = "Maximum climb rate magnitude since last message"]
16245    pub climb_rate: i8,
16246    #[doc = "Battery level (-1 if field not provided)."]
16247    pub battery: i8,
16248    #[doc = "Field for custom payload."]
16249    pub custom0: i8,
16250    #[doc = "Field for custom payload."]
16251    pub custom1: i8,
16252    #[doc = "Field for custom payload."]
16253    pub custom2: i8,
16254}
16255impl HIGH_LATENCY2_DATA {
16256    pub const ENCODED_LEN: usize = 42usize;
16257    pub const DEFAULT: Self = Self {
16258        timestamp: 0_u32,
16259        latitude: 0_i32,
16260        longitude: 0_i32,
16261        custom_mode: 0_u16,
16262        altitude: 0_i16,
16263        target_altitude: 0_i16,
16264        target_distance: 0_u16,
16265        wp_num: 0_u16,
16266        failure_flags: HlFailureFlag::DEFAULT,
16267        mavtype: MavType::DEFAULT,
16268        autopilot: MavAutopilot::DEFAULT,
16269        heading: 0_u8,
16270        target_heading: 0_u8,
16271        throttle: 0_u8,
16272        airspeed: 0_u8,
16273        airspeed_sp: 0_u8,
16274        groundspeed: 0_u8,
16275        windspeed: 0_u8,
16276        wind_heading: 0_u8,
16277        eph: 0_u8,
16278        epv: 0_u8,
16279        temperature_air: 0_i8,
16280        climb_rate: 0_i8,
16281        battery: 0_i8,
16282        custom0: 0_i8,
16283        custom1: 0_i8,
16284        custom2: 0_i8,
16285    };
16286    #[cfg(feature = "arbitrary")]
16287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16288        use arbitrary::{Arbitrary, Unstructured};
16289        let mut buf = [0u8; 1024];
16290        rng.fill_bytes(&mut buf);
16291        let mut unstructured = Unstructured::new(&buf);
16292        Self::arbitrary(&mut unstructured).unwrap_or_default()
16293    }
16294}
16295impl Default for HIGH_LATENCY2_DATA {
16296    fn default() -> Self {
16297        Self::DEFAULT.clone()
16298    }
16299}
16300impl MessageData for HIGH_LATENCY2_DATA {
16301    type Message = MavMessage;
16302    const ID: u32 = 235u32;
16303    const NAME: &'static str = "HIGH_LATENCY2";
16304    const EXTRA_CRC: u8 = 179u8;
16305    const ENCODED_LEN: usize = 42usize;
16306    fn deser(
16307        _version: MavlinkVersion,
16308        __input: &[u8],
16309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16310        let avail_len = __input.len();
16311        let mut payload_buf = [0; Self::ENCODED_LEN];
16312        let mut buf = if avail_len < Self::ENCODED_LEN {
16313            payload_buf[0..avail_len].copy_from_slice(__input);
16314            Bytes::new(&payload_buf)
16315        } else {
16316            Bytes::new(__input)
16317        };
16318        let mut __struct = Self::default();
16319        __struct.timestamp = buf.get_u32_le();
16320        __struct.latitude = buf.get_i32_le();
16321        __struct.longitude = buf.get_i32_le();
16322        __struct.custom_mode = buf.get_u16_le();
16323        __struct.altitude = buf.get_i16_le();
16324        __struct.target_altitude = buf.get_i16_le();
16325        __struct.target_distance = buf.get_u16_le();
16326        __struct.wp_num = buf.get_u16_le();
16327        let tmp = buf.get_u16_le();
16328        __struct.failure_flags = HlFailureFlag::from_bits(tmp).ok_or(
16329            ::mavlink_core::error::ParserError::InvalidFlag {
16330                flag_type: "HlFailureFlag",
16331                value: tmp as u64,
16332            },
16333        )?;
16334        let tmp = buf.get_u8();
16335        __struct.mavtype =
16336            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16337                enum_type: "MavType",
16338                value: tmp as u64,
16339            })?;
16340        let tmp = buf.get_u8();
16341        __struct.autopilot =
16342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16343                enum_type: "MavAutopilot",
16344                value: tmp as u64,
16345            })?;
16346        __struct.heading = buf.get_u8();
16347        __struct.target_heading = buf.get_u8();
16348        __struct.throttle = buf.get_u8();
16349        __struct.airspeed = buf.get_u8();
16350        __struct.airspeed_sp = buf.get_u8();
16351        __struct.groundspeed = buf.get_u8();
16352        __struct.windspeed = buf.get_u8();
16353        __struct.wind_heading = buf.get_u8();
16354        __struct.eph = buf.get_u8();
16355        __struct.epv = buf.get_u8();
16356        __struct.temperature_air = buf.get_i8();
16357        __struct.climb_rate = buf.get_i8();
16358        __struct.battery = buf.get_i8();
16359        __struct.custom0 = buf.get_i8();
16360        __struct.custom1 = buf.get_i8();
16361        __struct.custom2 = buf.get_i8();
16362        Ok(__struct)
16363    }
16364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16365        let mut __tmp = BytesMut::new(bytes);
16366        #[allow(clippy::absurd_extreme_comparisons)]
16367        #[allow(unused_comparisons)]
16368        if __tmp.remaining() < Self::ENCODED_LEN {
16369            panic!(
16370                "buffer is too small (need {} bytes, but got {})",
16371                Self::ENCODED_LEN,
16372                __tmp.remaining(),
16373            )
16374        }
16375        __tmp.put_u32_le(self.timestamp);
16376        __tmp.put_i32_le(self.latitude);
16377        __tmp.put_i32_le(self.longitude);
16378        __tmp.put_u16_le(self.custom_mode);
16379        __tmp.put_i16_le(self.altitude);
16380        __tmp.put_i16_le(self.target_altitude);
16381        __tmp.put_u16_le(self.target_distance);
16382        __tmp.put_u16_le(self.wp_num);
16383        __tmp.put_u16_le(self.failure_flags.bits());
16384        __tmp.put_u8(self.mavtype as u8);
16385        __tmp.put_u8(self.autopilot as u8);
16386        __tmp.put_u8(self.heading);
16387        __tmp.put_u8(self.target_heading);
16388        __tmp.put_u8(self.throttle);
16389        __tmp.put_u8(self.airspeed);
16390        __tmp.put_u8(self.airspeed_sp);
16391        __tmp.put_u8(self.groundspeed);
16392        __tmp.put_u8(self.windspeed);
16393        __tmp.put_u8(self.wind_heading);
16394        __tmp.put_u8(self.eph);
16395        __tmp.put_u8(self.epv);
16396        __tmp.put_i8(self.temperature_air);
16397        __tmp.put_i8(self.climb_rate);
16398        __tmp.put_i8(self.battery);
16399        __tmp.put_i8(self.custom0);
16400        __tmp.put_i8(self.custom1);
16401        __tmp.put_i8(self.custom2);
16402        if matches!(version, MavlinkVersion::V2) {
16403            let len = __tmp.len();
16404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16405        } else {
16406            __tmp.len()
16407        }
16408    }
16409}
16410#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16411#[doc = ""]
16412#[doc = "ID: 93"]
16413#[derive(Debug, Clone, PartialEq)]
16414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16416#[cfg_attr(feature = "ts", derive(TS))]
16417#[cfg_attr(feature = "ts", ts(export))]
16418pub struct HIL_ACTUATOR_CONTROLS_DATA {
16419    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16420    pub time_usec: u64,
16421    #[doc = "Flags bitmask."]
16422    pub flags: HilActuatorControlsFlags,
16423    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16426    pub controls: [f32; 16],
16427    #[doc = "System mode. Includes arming state."]
16428    pub mode: MavModeFlag,
16429}
16430impl HIL_ACTUATOR_CONTROLS_DATA {
16431    pub const ENCODED_LEN: usize = 81usize;
16432    pub const DEFAULT: Self = Self {
16433        time_usec: 0_u64,
16434        flags: HilActuatorControlsFlags::DEFAULT,
16435        controls: [0.0_f32; 16usize],
16436        mode: MavModeFlag::DEFAULT,
16437    };
16438    #[cfg(feature = "arbitrary")]
16439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16440        use arbitrary::{Arbitrary, Unstructured};
16441        let mut buf = [0u8; 1024];
16442        rng.fill_bytes(&mut buf);
16443        let mut unstructured = Unstructured::new(&buf);
16444        Self::arbitrary(&mut unstructured).unwrap_or_default()
16445    }
16446}
16447impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16448    fn default() -> Self {
16449        Self::DEFAULT.clone()
16450    }
16451}
16452impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16453    type Message = MavMessage;
16454    const ID: u32 = 93u32;
16455    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16456    const EXTRA_CRC: u8 = 47u8;
16457    const ENCODED_LEN: usize = 81usize;
16458    fn deser(
16459        _version: MavlinkVersion,
16460        __input: &[u8],
16461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16462        let avail_len = __input.len();
16463        let mut payload_buf = [0; Self::ENCODED_LEN];
16464        let mut buf = if avail_len < Self::ENCODED_LEN {
16465            payload_buf[0..avail_len].copy_from_slice(__input);
16466            Bytes::new(&payload_buf)
16467        } else {
16468            Bytes::new(__input)
16469        };
16470        let mut __struct = Self::default();
16471        __struct.time_usec = buf.get_u64_le();
16472        let tmp = buf.get_u64_le();
16473        __struct.flags = HilActuatorControlsFlags::from_bits(tmp).ok_or(
16474            ::mavlink_core::error::ParserError::InvalidFlag {
16475                flag_type: "HilActuatorControlsFlags",
16476                value: tmp as u64,
16477            },
16478        )?;
16479        for v in &mut __struct.controls {
16480            let val = buf.get_f32_le();
16481            *v = val;
16482        }
16483        let tmp = buf.get_u8();
16484        __struct.mode =
16485            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16486                flag_type: "MavModeFlag",
16487                value: tmp as u64,
16488            })?;
16489        Ok(__struct)
16490    }
16491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16492        let mut __tmp = BytesMut::new(bytes);
16493        #[allow(clippy::absurd_extreme_comparisons)]
16494        #[allow(unused_comparisons)]
16495        if __tmp.remaining() < Self::ENCODED_LEN {
16496            panic!(
16497                "buffer is too small (need {} bytes, but got {})",
16498                Self::ENCODED_LEN,
16499                __tmp.remaining(),
16500            )
16501        }
16502        __tmp.put_u64_le(self.time_usec);
16503        __tmp.put_u64_le(self.flags.bits());
16504        for val in &self.controls {
16505            __tmp.put_f32_le(*val);
16506        }
16507        __tmp.put_u8(self.mode.bits());
16508        if matches!(version, MavlinkVersion::V2) {
16509            let len = __tmp.len();
16510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16511        } else {
16512            __tmp.len()
16513        }
16514    }
16515}
16516#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16517#[doc = ""]
16518#[doc = "ID: 91"]
16519#[derive(Debug, Clone, PartialEq)]
16520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16522#[cfg_attr(feature = "ts", derive(TS))]
16523#[cfg_attr(feature = "ts", ts(export))]
16524pub struct HIL_CONTROLS_DATA {
16525    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16526    pub time_usec: u64,
16527    #[doc = "Control output -1 .. 1"]
16528    pub roll_ailerons: f32,
16529    #[doc = "Control output -1 .. 1"]
16530    pub pitch_elevator: f32,
16531    #[doc = "Control output -1 .. 1"]
16532    pub yaw_rudder: f32,
16533    #[doc = "Throttle 0 .. 1"]
16534    pub throttle: f32,
16535    #[doc = "Aux 1, -1 .. 1"]
16536    pub aux1: f32,
16537    #[doc = "Aux 2, -1 .. 1"]
16538    pub aux2: f32,
16539    #[doc = "Aux 3, -1 .. 1"]
16540    pub aux3: f32,
16541    #[doc = "Aux 4, -1 .. 1"]
16542    pub aux4: f32,
16543    #[doc = "System mode."]
16544    pub mode: MavMode,
16545    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16546    pub nav_mode: u8,
16547}
16548impl HIL_CONTROLS_DATA {
16549    pub const ENCODED_LEN: usize = 42usize;
16550    pub const DEFAULT: Self = Self {
16551        time_usec: 0_u64,
16552        roll_ailerons: 0.0_f32,
16553        pitch_elevator: 0.0_f32,
16554        yaw_rudder: 0.0_f32,
16555        throttle: 0.0_f32,
16556        aux1: 0.0_f32,
16557        aux2: 0.0_f32,
16558        aux3: 0.0_f32,
16559        aux4: 0.0_f32,
16560        mode: MavMode::DEFAULT,
16561        nav_mode: 0_u8,
16562    };
16563    #[cfg(feature = "arbitrary")]
16564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16565        use arbitrary::{Arbitrary, Unstructured};
16566        let mut buf = [0u8; 1024];
16567        rng.fill_bytes(&mut buf);
16568        let mut unstructured = Unstructured::new(&buf);
16569        Self::arbitrary(&mut unstructured).unwrap_or_default()
16570    }
16571}
16572impl Default for HIL_CONTROLS_DATA {
16573    fn default() -> Self {
16574        Self::DEFAULT.clone()
16575    }
16576}
16577impl MessageData for HIL_CONTROLS_DATA {
16578    type Message = MavMessage;
16579    const ID: u32 = 91u32;
16580    const NAME: &'static str = "HIL_CONTROLS";
16581    const EXTRA_CRC: u8 = 63u8;
16582    const ENCODED_LEN: usize = 42usize;
16583    fn deser(
16584        _version: MavlinkVersion,
16585        __input: &[u8],
16586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16587        let avail_len = __input.len();
16588        let mut payload_buf = [0; Self::ENCODED_LEN];
16589        let mut buf = if avail_len < Self::ENCODED_LEN {
16590            payload_buf[0..avail_len].copy_from_slice(__input);
16591            Bytes::new(&payload_buf)
16592        } else {
16593            Bytes::new(__input)
16594        };
16595        let mut __struct = Self::default();
16596        __struct.time_usec = buf.get_u64_le();
16597        __struct.roll_ailerons = buf.get_f32_le();
16598        __struct.pitch_elevator = buf.get_f32_le();
16599        __struct.yaw_rudder = buf.get_f32_le();
16600        __struct.throttle = buf.get_f32_le();
16601        __struct.aux1 = buf.get_f32_le();
16602        __struct.aux2 = buf.get_f32_le();
16603        __struct.aux3 = buf.get_f32_le();
16604        __struct.aux4 = buf.get_f32_le();
16605        let tmp = buf.get_u8();
16606        __struct.mode =
16607            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16608                enum_type: "MavMode",
16609                value: tmp as u64,
16610            })?;
16611        __struct.nav_mode = buf.get_u8();
16612        Ok(__struct)
16613    }
16614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16615        let mut __tmp = BytesMut::new(bytes);
16616        #[allow(clippy::absurd_extreme_comparisons)]
16617        #[allow(unused_comparisons)]
16618        if __tmp.remaining() < Self::ENCODED_LEN {
16619            panic!(
16620                "buffer is too small (need {} bytes, but got {})",
16621                Self::ENCODED_LEN,
16622                __tmp.remaining(),
16623            )
16624        }
16625        __tmp.put_u64_le(self.time_usec);
16626        __tmp.put_f32_le(self.roll_ailerons);
16627        __tmp.put_f32_le(self.pitch_elevator);
16628        __tmp.put_f32_le(self.yaw_rudder);
16629        __tmp.put_f32_le(self.throttle);
16630        __tmp.put_f32_le(self.aux1);
16631        __tmp.put_f32_le(self.aux2);
16632        __tmp.put_f32_le(self.aux3);
16633        __tmp.put_f32_le(self.aux4);
16634        __tmp.put_u8(self.mode as u8);
16635        __tmp.put_u8(self.nav_mode);
16636        if matches!(version, MavlinkVersion::V2) {
16637            let len = __tmp.len();
16638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16639        } else {
16640            __tmp.len()
16641        }
16642    }
16643}
16644#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16645#[doc = ""]
16646#[doc = "ID: 113"]
16647#[derive(Debug, Clone, PartialEq)]
16648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16650#[cfg_attr(feature = "ts", derive(TS))]
16651#[cfg_attr(feature = "ts", ts(export))]
16652pub struct HIL_GPS_DATA {
16653    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16654    pub time_usec: u64,
16655    #[doc = "Latitude (WGS84)"]
16656    pub lat: i32,
16657    #[doc = "Longitude (WGS84)"]
16658    pub lon: i32,
16659    #[doc = "Altitude (MSL). Positive for up."]
16660    pub alt: i32,
16661    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16662    pub eph: u16,
16663    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16664    pub epv: u16,
16665    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16666    pub vel: u16,
16667    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16668    pub vn: i16,
16669    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16670    pub ve: i16,
16671    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16672    pub vd: i16,
16673    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16674    pub cog: u16,
16675    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16676    pub fix_type: u8,
16677    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16678    pub satellites_visible: u8,
16679    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16681    pub id: u8,
16682    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16683    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16684    pub yaw: u16,
16685}
16686impl HIL_GPS_DATA {
16687    pub const ENCODED_LEN: usize = 39usize;
16688    pub const DEFAULT: Self = Self {
16689        time_usec: 0_u64,
16690        lat: 0_i32,
16691        lon: 0_i32,
16692        alt: 0_i32,
16693        eph: 0_u16,
16694        epv: 0_u16,
16695        vel: 0_u16,
16696        vn: 0_i16,
16697        ve: 0_i16,
16698        vd: 0_i16,
16699        cog: 0_u16,
16700        fix_type: 0_u8,
16701        satellites_visible: 0_u8,
16702        id: 0_u8,
16703        yaw: 0_u16,
16704    };
16705    #[cfg(feature = "arbitrary")]
16706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16707        use arbitrary::{Arbitrary, Unstructured};
16708        let mut buf = [0u8; 1024];
16709        rng.fill_bytes(&mut buf);
16710        let mut unstructured = Unstructured::new(&buf);
16711        Self::arbitrary(&mut unstructured).unwrap_or_default()
16712    }
16713}
16714impl Default for HIL_GPS_DATA {
16715    fn default() -> Self {
16716        Self::DEFAULT.clone()
16717    }
16718}
16719impl MessageData for HIL_GPS_DATA {
16720    type Message = MavMessage;
16721    const ID: u32 = 113u32;
16722    const NAME: &'static str = "HIL_GPS";
16723    const EXTRA_CRC: u8 = 124u8;
16724    const ENCODED_LEN: usize = 39usize;
16725    fn deser(
16726        _version: MavlinkVersion,
16727        __input: &[u8],
16728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16729        let avail_len = __input.len();
16730        let mut payload_buf = [0; Self::ENCODED_LEN];
16731        let mut buf = if avail_len < Self::ENCODED_LEN {
16732            payload_buf[0..avail_len].copy_from_slice(__input);
16733            Bytes::new(&payload_buf)
16734        } else {
16735            Bytes::new(__input)
16736        };
16737        let mut __struct = Self::default();
16738        __struct.time_usec = buf.get_u64_le();
16739        __struct.lat = buf.get_i32_le();
16740        __struct.lon = buf.get_i32_le();
16741        __struct.alt = buf.get_i32_le();
16742        __struct.eph = buf.get_u16_le();
16743        __struct.epv = buf.get_u16_le();
16744        __struct.vel = buf.get_u16_le();
16745        __struct.vn = buf.get_i16_le();
16746        __struct.ve = buf.get_i16_le();
16747        __struct.vd = buf.get_i16_le();
16748        __struct.cog = buf.get_u16_le();
16749        __struct.fix_type = buf.get_u8();
16750        __struct.satellites_visible = buf.get_u8();
16751        __struct.id = buf.get_u8();
16752        __struct.yaw = buf.get_u16_le();
16753        Ok(__struct)
16754    }
16755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16756        let mut __tmp = BytesMut::new(bytes);
16757        #[allow(clippy::absurd_extreme_comparisons)]
16758        #[allow(unused_comparisons)]
16759        if __tmp.remaining() < Self::ENCODED_LEN {
16760            panic!(
16761                "buffer is too small (need {} bytes, but got {})",
16762                Self::ENCODED_LEN,
16763                __tmp.remaining(),
16764            )
16765        }
16766        __tmp.put_u64_le(self.time_usec);
16767        __tmp.put_i32_le(self.lat);
16768        __tmp.put_i32_le(self.lon);
16769        __tmp.put_i32_le(self.alt);
16770        __tmp.put_u16_le(self.eph);
16771        __tmp.put_u16_le(self.epv);
16772        __tmp.put_u16_le(self.vel);
16773        __tmp.put_i16_le(self.vn);
16774        __tmp.put_i16_le(self.ve);
16775        __tmp.put_i16_le(self.vd);
16776        __tmp.put_u16_le(self.cog);
16777        __tmp.put_u8(self.fix_type);
16778        __tmp.put_u8(self.satellites_visible);
16779        if matches!(version, MavlinkVersion::V2) {
16780            __tmp.put_u8(self.id);
16781            __tmp.put_u16_le(self.yaw);
16782            let len = __tmp.len();
16783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16784        } else {
16785            __tmp.len()
16786        }
16787    }
16788}
16789#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16790#[doc = ""]
16791#[doc = "ID: 114"]
16792#[derive(Debug, Clone, PartialEq)]
16793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16795#[cfg_attr(feature = "ts", derive(TS))]
16796#[cfg_attr(feature = "ts", ts(export))]
16797pub struct HIL_OPTICAL_FLOW_DATA {
16798    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16799    pub time_usec: u64,
16800    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16801    pub integration_time_us: u32,
16802    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16803    pub integrated_x: f32,
16804    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16805    pub integrated_y: f32,
16806    #[doc = "RH rotation around X axis"]
16807    pub integrated_xgyro: f32,
16808    #[doc = "RH rotation around Y axis"]
16809    pub integrated_ygyro: f32,
16810    #[doc = "RH rotation around Z axis"]
16811    pub integrated_zgyro: f32,
16812    #[doc = "Time since the distance was sampled."]
16813    pub time_delta_distance_us: u32,
16814    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16815    pub distance: f32,
16816    #[doc = "Temperature"]
16817    pub temperature: i16,
16818    #[doc = "Sensor ID"]
16819    pub sensor_id: u8,
16820    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16821    pub quality: u8,
16822}
16823impl HIL_OPTICAL_FLOW_DATA {
16824    pub const ENCODED_LEN: usize = 44usize;
16825    pub const DEFAULT: Self = Self {
16826        time_usec: 0_u64,
16827        integration_time_us: 0_u32,
16828        integrated_x: 0.0_f32,
16829        integrated_y: 0.0_f32,
16830        integrated_xgyro: 0.0_f32,
16831        integrated_ygyro: 0.0_f32,
16832        integrated_zgyro: 0.0_f32,
16833        time_delta_distance_us: 0_u32,
16834        distance: 0.0_f32,
16835        temperature: 0_i16,
16836        sensor_id: 0_u8,
16837        quality: 0_u8,
16838    };
16839    #[cfg(feature = "arbitrary")]
16840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16841        use arbitrary::{Arbitrary, Unstructured};
16842        let mut buf = [0u8; 1024];
16843        rng.fill_bytes(&mut buf);
16844        let mut unstructured = Unstructured::new(&buf);
16845        Self::arbitrary(&mut unstructured).unwrap_or_default()
16846    }
16847}
16848impl Default for HIL_OPTICAL_FLOW_DATA {
16849    fn default() -> Self {
16850        Self::DEFAULT.clone()
16851    }
16852}
16853impl MessageData for HIL_OPTICAL_FLOW_DATA {
16854    type Message = MavMessage;
16855    const ID: u32 = 114u32;
16856    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16857    const EXTRA_CRC: u8 = 237u8;
16858    const ENCODED_LEN: usize = 44usize;
16859    fn deser(
16860        _version: MavlinkVersion,
16861        __input: &[u8],
16862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16863        let avail_len = __input.len();
16864        let mut payload_buf = [0; Self::ENCODED_LEN];
16865        let mut buf = if avail_len < Self::ENCODED_LEN {
16866            payload_buf[0..avail_len].copy_from_slice(__input);
16867            Bytes::new(&payload_buf)
16868        } else {
16869            Bytes::new(__input)
16870        };
16871        let mut __struct = Self::default();
16872        __struct.time_usec = buf.get_u64_le();
16873        __struct.integration_time_us = buf.get_u32_le();
16874        __struct.integrated_x = buf.get_f32_le();
16875        __struct.integrated_y = buf.get_f32_le();
16876        __struct.integrated_xgyro = buf.get_f32_le();
16877        __struct.integrated_ygyro = buf.get_f32_le();
16878        __struct.integrated_zgyro = buf.get_f32_le();
16879        __struct.time_delta_distance_us = buf.get_u32_le();
16880        __struct.distance = buf.get_f32_le();
16881        __struct.temperature = buf.get_i16_le();
16882        __struct.sensor_id = buf.get_u8();
16883        __struct.quality = buf.get_u8();
16884        Ok(__struct)
16885    }
16886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16887        let mut __tmp = BytesMut::new(bytes);
16888        #[allow(clippy::absurd_extreme_comparisons)]
16889        #[allow(unused_comparisons)]
16890        if __tmp.remaining() < Self::ENCODED_LEN {
16891            panic!(
16892                "buffer is too small (need {} bytes, but got {})",
16893                Self::ENCODED_LEN,
16894                __tmp.remaining(),
16895            )
16896        }
16897        __tmp.put_u64_le(self.time_usec);
16898        __tmp.put_u32_le(self.integration_time_us);
16899        __tmp.put_f32_le(self.integrated_x);
16900        __tmp.put_f32_le(self.integrated_y);
16901        __tmp.put_f32_le(self.integrated_xgyro);
16902        __tmp.put_f32_le(self.integrated_ygyro);
16903        __tmp.put_f32_le(self.integrated_zgyro);
16904        __tmp.put_u32_le(self.time_delta_distance_us);
16905        __tmp.put_f32_le(self.distance);
16906        __tmp.put_i16_le(self.temperature);
16907        __tmp.put_u8(self.sensor_id);
16908        __tmp.put_u8(self.quality);
16909        if matches!(version, MavlinkVersion::V2) {
16910            let len = __tmp.len();
16911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16912        } else {
16913            __tmp.len()
16914        }
16915    }
16916}
16917#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16918#[doc = ""]
16919#[doc = "ID: 92"]
16920#[derive(Debug, Clone, PartialEq)]
16921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16923#[cfg_attr(feature = "ts", derive(TS))]
16924#[cfg_attr(feature = "ts", ts(export))]
16925pub struct HIL_RC_INPUTS_RAW_DATA {
16926    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16927    pub time_usec: u64,
16928    #[doc = "RC channel 1 value"]
16929    pub chan1_raw: u16,
16930    #[doc = "RC channel 2 value"]
16931    pub chan2_raw: u16,
16932    #[doc = "RC channel 3 value"]
16933    pub chan3_raw: u16,
16934    #[doc = "RC channel 4 value"]
16935    pub chan4_raw: u16,
16936    #[doc = "RC channel 5 value"]
16937    pub chan5_raw: u16,
16938    #[doc = "RC channel 6 value"]
16939    pub chan6_raw: u16,
16940    #[doc = "RC channel 7 value"]
16941    pub chan7_raw: u16,
16942    #[doc = "RC channel 8 value"]
16943    pub chan8_raw: u16,
16944    #[doc = "RC channel 9 value"]
16945    pub chan9_raw: u16,
16946    #[doc = "RC channel 10 value"]
16947    pub chan10_raw: u16,
16948    #[doc = "RC channel 11 value"]
16949    pub chan11_raw: u16,
16950    #[doc = "RC channel 12 value"]
16951    pub chan12_raw: u16,
16952    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16953    pub rssi: u8,
16954}
16955impl HIL_RC_INPUTS_RAW_DATA {
16956    pub const ENCODED_LEN: usize = 33usize;
16957    pub const DEFAULT: Self = Self {
16958        time_usec: 0_u64,
16959        chan1_raw: 0_u16,
16960        chan2_raw: 0_u16,
16961        chan3_raw: 0_u16,
16962        chan4_raw: 0_u16,
16963        chan5_raw: 0_u16,
16964        chan6_raw: 0_u16,
16965        chan7_raw: 0_u16,
16966        chan8_raw: 0_u16,
16967        chan9_raw: 0_u16,
16968        chan10_raw: 0_u16,
16969        chan11_raw: 0_u16,
16970        chan12_raw: 0_u16,
16971        rssi: 0_u8,
16972    };
16973    #[cfg(feature = "arbitrary")]
16974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16975        use arbitrary::{Arbitrary, Unstructured};
16976        let mut buf = [0u8; 1024];
16977        rng.fill_bytes(&mut buf);
16978        let mut unstructured = Unstructured::new(&buf);
16979        Self::arbitrary(&mut unstructured).unwrap_or_default()
16980    }
16981}
16982impl Default for HIL_RC_INPUTS_RAW_DATA {
16983    fn default() -> Self {
16984        Self::DEFAULT.clone()
16985    }
16986}
16987impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16988    type Message = MavMessage;
16989    const ID: u32 = 92u32;
16990    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16991    const EXTRA_CRC: u8 = 54u8;
16992    const ENCODED_LEN: usize = 33usize;
16993    fn deser(
16994        _version: MavlinkVersion,
16995        __input: &[u8],
16996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16997        let avail_len = __input.len();
16998        let mut payload_buf = [0; Self::ENCODED_LEN];
16999        let mut buf = if avail_len < Self::ENCODED_LEN {
17000            payload_buf[0..avail_len].copy_from_slice(__input);
17001            Bytes::new(&payload_buf)
17002        } else {
17003            Bytes::new(__input)
17004        };
17005        let mut __struct = Self::default();
17006        __struct.time_usec = buf.get_u64_le();
17007        __struct.chan1_raw = buf.get_u16_le();
17008        __struct.chan2_raw = buf.get_u16_le();
17009        __struct.chan3_raw = buf.get_u16_le();
17010        __struct.chan4_raw = buf.get_u16_le();
17011        __struct.chan5_raw = buf.get_u16_le();
17012        __struct.chan6_raw = buf.get_u16_le();
17013        __struct.chan7_raw = buf.get_u16_le();
17014        __struct.chan8_raw = buf.get_u16_le();
17015        __struct.chan9_raw = buf.get_u16_le();
17016        __struct.chan10_raw = buf.get_u16_le();
17017        __struct.chan11_raw = buf.get_u16_le();
17018        __struct.chan12_raw = buf.get_u16_le();
17019        __struct.rssi = buf.get_u8();
17020        Ok(__struct)
17021    }
17022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17023        let mut __tmp = BytesMut::new(bytes);
17024        #[allow(clippy::absurd_extreme_comparisons)]
17025        #[allow(unused_comparisons)]
17026        if __tmp.remaining() < Self::ENCODED_LEN {
17027            panic!(
17028                "buffer is too small (need {} bytes, but got {})",
17029                Self::ENCODED_LEN,
17030                __tmp.remaining(),
17031            )
17032        }
17033        __tmp.put_u64_le(self.time_usec);
17034        __tmp.put_u16_le(self.chan1_raw);
17035        __tmp.put_u16_le(self.chan2_raw);
17036        __tmp.put_u16_le(self.chan3_raw);
17037        __tmp.put_u16_le(self.chan4_raw);
17038        __tmp.put_u16_le(self.chan5_raw);
17039        __tmp.put_u16_le(self.chan6_raw);
17040        __tmp.put_u16_le(self.chan7_raw);
17041        __tmp.put_u16_le(self.chan8_raw);
17042        __tmp.put_u16_le(self.chan9_raw);
17043        __tmp.put_u16_le(self.chan10_raw);
17044        __tmp.put_u16_le(self.chan11_raw);
17045        __tmp.put_u16_le(self.chan12_raw);
17046        __tmp.put_u8(self.rssi);
17047        if matches!(version, MavlinkVersion::V2) {
17048            let len = __tmp.len();
17049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17050        } else {
17051            __tmp.len()
17052        }
17053    }
17054}
17055#[doc = "The IMU readings in SI units in NED body frame."]
17056#[doc = ""]
17057#[doc = "ID: 107"]
17058#[derive(Debug, Clone, PartialEq)]
17059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17061#[cfg_attr(feature = "ts", derive(TS))]
17062#[cfg_attr(feature = "ts", ts(export))]
17063pub struct HIL_SENSOR_DATA {
17064    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17065    pub time_usec: u64,
17066    #[doc = "X acceleration"]
17067    pub xacc: f32,
17068    #[doc = "Y acceleration"]
17069    pub yacc: f32,
17070    #[doc = "Z acceleration"]
17071    pub zacc: f32,
17072    #[doc = "Angular speed around X axis in body frame"]
17073    pub xgyro: f32,
17074    #[doc = "Angular speed around Y axis in body frame"]
17075    pub ygyro: f32,
17076    #[doc = "Angular speed around Z axis in body frame"]
17077    pub zgyro: f32,
17078    #[doc = "X Magnetic field"]
17079    pub xmag: f32,
17080    #[doc = "Y Magnetic field"]
17081    pub ymag: f32,
17082    #[doc = "Z Magnetic field"]
17083    pub zmag: f32,
17084    #[doc = "Absolute pressure"]
17085    pub abs_pressure: f32,
17086    #[doc = "Differential pressure (airspeed)"]
17087    pub diff_pressure: f32,
17088    #[doc = "Altitude calculated from pressure"]
17089    pub pressure_alt: f32,
17090    #[doc = "Temperature"]
17091    pub temperature: f32,
17092    #[doc = "Bitmap for fields that have updated since last message"]
17093    pub fields_updated: HilSensorUpdatedFlags,
17094    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17096    pub id: u8,
17097}
17098impl HIL_SENSOR_DATA {
17099    pub const ENCODED_LEN: usize = 65usize;
17100    pub const DEFAULT: Self = Self {
17101        time_usec: 0_u64,
17102        xacc: 0.0_f32,
17103        yacc: 0.0_f32,
17104        zacc: 0.0_f32,
17105        xgyro: 0.0_f32,
17106        ygyro: 0.0_f32,
17107        zgyro: 0.0_f32,
17108        xmag: 0.0_f32,
17109        ymag: 0.0_f32,
17110        zmag: 0.0_f32,
17111        abs_pressure: 0.0_f32,
17112        diff_pressure: 0.0_f32,
17113        pressure_alt: 0.0_f32,
17114        temperature: 0.0_f32,
17115        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17116        id: 0_u8,
17117    };
17118    #[cfg(feature = "arbitrary")]
17119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17120        use arbitrary::{Arbitrary, Unstructured};
17121        let mut buf = [0u8; 1024];
17122        rng.fill_bytes(&mut buf);
17123        let mut unstructured = Unstructured::new(&buf);
17124        Self::arbitrary(&mut unstructured).unwrap_or_default()
17125    }
17126}
17127impl Default for HIL_SENSOR_DATA {
17128    fn default() -> Self {
17129        Self::DEFAULT.clone()
17130    }
17131}
17132impl MessageData for HIL_SENSOR_DATA {
17133    type Message = MavMessage;
17134    const ID: u32 = 107u32;
17135    const NAME: &'static str = "HIL_SENSOR";
17136    const EXTRA_CRC: u8 = 108u8;
17137    const ENCODED_LEN: usize = 65usize;
17138    fn deser(
17139        _version: MavlinkVersion,
17140        __input: &[u8],
17141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17142        let avail_len = __input.len();
17143        let mut payload_buf = [0; Self::ENCODED_LEN];
17144        let mut buf = if avail_len < Self::ENCODED_LEN {
17145            payload_buf[0..avail_len].copy_from_slice(__input);
17146            Bytes::new(&payload_buf)
17147        } else {
17148            Bytes::new(__input)
17149        };
17150        let mut __struct = Self::default();
17151        __struct.time_usec = buf.get_u64_le();
17152        __struct.xacc = buf.get_f32_le();
17153        __struct.yacc = buf.get_f32_le();
17154        __struct.zacc = buf.get_f32_le();
17155        __struct.xgyro = buf.get_f32_le();
17156        __struct.ygyro = buf.get_f32_le();
17157        __struct.zgyro = buf.get_f32_le();
17158        __struct.xmag = buf.get_f32_le();
17159        __struct.ymag = buf.get_f32_le();
17160        __struct.zmag = buf.get_f32_le();
17161        __struct.abs_pressure = buf.get_f32_le();
17162        __struct.diff_pressure = buf.get_f32_le();
17163        __struct.pressure_alt = buf.get_f32_le();
17164        __struct.temperature = buf.get_f32_le();
17165        let tmp = buf.get_u32_le();
17166        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(tmp).ok_or(
17167            ::mavlink_core::error::ParserError::InvalidFlag {
17168                flag_type: "HilSensorUpdatedFlags",
17169                value: tmp as u64,
17170            },
17171        )?;
17172        __struct.id = buf.get_u8();
17173        Ok(__struct)
17174    }
17175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17176        let mut __tmp = BytesMut::new(bytes);
17177        #[allow(clippy::absurd_extreme_comparisons)]
17178        #[allow(unused_comparisons)]
17179        if __tmp.remaining() < Self::ENCODED_LEN {
17180            panic!(
17181                "buffer is too small (need {} bytes, but got {})",
17182                Self::ENCODED_LEN,
17183                __tmp.remaining(),
17184            )
17185        }
17186        __tmp.put_u64_le(self.time_usec);
17187        __tmp.put_f32_le(self.xacc);
17188        __tmp.put_f32_le(self.yacc);
17189        __tmp.put_f32_le(self.zacc);
17190        __tmp.put_f32_le(self.xgyro);
17191        __tmp.put_f32_le(self.ygyro);
17192        __tmp.put_f32_le(self.zgyro);
17193        __tmp.put_f32_le(self.xmag);
17194        __tmp.put_f32_le(self.ymag);
17195        __tmp.put_f32_le(self.zmag);
17196        __tmp.put_f32_le(self.abs_pressure);
17197        __tmp.put_f32_le(self.diff_pressure);
17198        __tmp.put_f32_le(self.pressure_alt);
17199        __tmp.put_f32_le(self.temperature);
17200        __tmp.put_u32_le(self.fields_updated.bits());
17201        if matches!(version, MavlinkVersion::V2) {
17202            __tmp.put_u8(self.id);
17203            let len = __tmp.len();
17204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17205        } else {
17206            __tmp.len()
17207        }
17208    }
17209}
17210#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17211#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17212#[doc = ""]
17213#[doc = "ID: 90"]
17214#[derive(Debug, Clone, PartialEq)]
17215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17217#[cfg_attr(feature = "ts", derive(TS))]
17218#[cfg_attr(feature = "ts", ts(export))]
17219pub struct HIL_STATE_DATA {
17220    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17221    pub time_usec: u64,
17222    #[doc = "Roll angle"]
17223    pub roll: f32,
17224    #[doc = "Pitch angle"]
17225    pub pitch: f32,
17226    #[doc = "Yaw angle"]
17227    pub yaw: f32,
17228    #[doc = "Body frame roll / phi angular speed"]
17229    pub rollspeed: f32,
17230    #[doc = "Body frame pitch / theta angular speed"]
17231    pub pitchspeed: f32,
17232    #[doc = "Body frame yaw / psi angular speed"]
17233    pub yawspeed: f32,
17234    #[doc = "Latitude"]
17235    pub lat: i32,
17236    #[doc = "Longitude"]
17237    pub lon: i32,
17238    #[doc = "Altitude"]
17239    pub alt: i32,
17240    #[doc = "Ground X Speed (Latitude)"]
17241    pub vx: i16,
17242    #[doc = "Ground Y Speed (Longitude)"]
17243    pub vy: i16,
17244    #[doc = "Ground Z Speed (Altitude)"]
17245    pub vz: i16,
17246    #[doc = "X acceleration"]
17247    pub xacc: i16,
17248    #[doc = "Y acceleration"]
17249    pub yacc: i16,
17250    #[doc = "Z acceleration"]
17251    pub zacc: i16,
17252}
17253impl HIL_STATE_DATA {
17254    pub const ENCODED_LEN: usize = 56usize;
17255    pub const DEFAULT: Self = Self {
17256        time_usec: 0_u64,
17257        roll: 0.0_f32,
17258        pitch: 0.0_f32,
17259        yaw: 0.0_f32,
17260        rollspeed: 0.0_f32,
17261        pitchspeed: 0.0_f32,
17262        yawspeed: 0.0_f32,
17263        lat: 0_i32,
17264        lon: 0_i32,
17265        alt: 0_i32,
17266        vx: 0_i16,
17267        vy: 0_i16,
17268        vz: 0_i16,
17269        xacc: 0_i16,
17270        yacc: 0_i16,
17271        zacc: 0_i16,
17272    };
17273    #[cfg(feature = "arbitrary")]
17274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17275        use arbitrary::{Arbitrary, Unstructured};
17276        let mut buf = [0u8; 1024];
17277        rng.fill_bytes(&mut buf);
17278        let mut unstructured = Unstructured::new(&buf);
17279        Self::arbitrary(&mut unstructured).unwrap_or_default()
17280    }
17281}
17282impl Default for HIL_STATE_DATA {
17283    fn default() -> Self {
17284        Self::DEFAULT.clone()
17285    }
17286}
17287impl MessageData for HIL_STATE_DATA {
17288    type Message = MavMessage;
17289    const ID: u32 = 90u32;
17290    const NAME: &'static str = "HIL_STATE";
17291    const EXTRA_CRC: u8 = 183u8;
17292    const ENCODED_LEN: usize = 56usize;
17293    fn deser(
17294        _version: MavlinkVersion,
17295        __input: &[u8],
17296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17297        let avail_len = __input.len();
17298        let mut payload_buf = [0; Self::ENCODED_LEN];
17299        let mut buf = if avail_len < Self::ENCODED_LEN {
17300            payload_buf[0..avail_len].copy_from_slice(__input);
17301            Bytes::new(&payload_buf)
17302        } else {
17303            Bytes::new(__input)
17304        };
17305        let mut __struct = Self::default();
17306        __struct.time_usec = buf.get_u64_le();
17307        __struct.roll = buf.get_f32_le();
17308        __struct.pitch = buf.get_f32_le();
17309        __struct.yaw = buf.get_f32_le();
17310        __struct.rollspeed = buf.get_f32_le();
17311        __struct.pitchspeed = buf.get_f32_le();
17312        __struct.yawspeed = buf.get_f32_le();
17313        __struct.lat = buf.get_i32_le();
17314        __struct.lon = buf.get_i32_le();
17315        __struct.alt = buf.get_i32_le();
17316        __struct.vx = buf.get_i16_le();
17317        __struct.vy = buf.get_i16_le();
17318        __struct.vz = buf.get_i16_le();
17319        __struct.xacc = buf.get_i16_le();
17320        __struct.yacc = buf.get_i16_le();
17321        __struct.zacc = buf.get_i16_le();
17322        Ok(__struct)
17323    }
17324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17325        let mut __tmp = BytesMut::new(bytes);
17326        #[allow(clippy::absurd_extreme_comparisons)]
17327        #[allow(unused_comparisons)]
17328        if __tmp.remaining() < Self::ENCODED_LEN {
17329            panic!(
17330                "buffer is too small (need {} bytes, but got {})",
17331                Self::ENCODED_LEN,
17332                __tmp.remaining(),
17333            )
17334        }
17335        __tmp.put_u64_le(self.time_usec);
17336        __tmp.put_f32_le(self.roll);
17337        __tmp.put_f32_le(self.pitch);
17338        __tmp.put_f32_le(self.yaw);
17339        __tmp.put_f32_le(self.rollspeed);
17340        __tmp.put_f32_le(self.pitchspeed);
17341        __tmp.put_f32_le(self.yawspeed);
17342        __tmp.put_i32_le(self.lat);
17343        __tmp.put_i32_le(self.lon);
17344        __tmp.put_i32_le(self.alt);
17345        __tmp.put_i16_le(self.vx);
17346        __tmp.put_i16_le(self.vy);
17347        __tmp.put_i16_le(self.vz);
17348        __tmp.put_i16_le(self.xacc);
17349        __tmp.put_i16_le(self.yacc);
17350        __tmp.put_i16_le(self.zacc);
17351        if matches!(version, MavlinkVersion::V2) {
17352            let len = __tmp.len();
17353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17354        } else {
17355            __tmp.len()
17356        }
17357    }
17358}
17359#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17360#[doc = ""]
17361#[doc = "ID: 115"]
17362#[derive(Debug, Clone, PartialEq)]
17363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17365#[cfg_attr(feature = "ts", derive(TS))]
17366#[cfg_attr(feature = "ts", ts(export))]
17367pub struct HIL_STATE_QUATERNION_DATA {
17368    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17369    pub time_usec: u64,
17370    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17372    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17373    pub attitude_quaternion: [f32; 4],
17374    #[doc = "Body frame roll / phi angular speed"]
17375    pub rollspeed: f32,
17376    #[doc = "Body frame pitch / theta angular speed"]
17377    pub pitchspeed: f32,
17378    #[doc = "Body frame yaw / psi angular speed"]
17379    pub yawspeed: f32,
17380    #[doc = "Latitude"]
17381    pub lat: i32,
17382    #[doc = "Longitude"]
17383    pub lon: i32,
17384    #[doc = "Altitude"]
17385    pub alt: i32,
17386    #[doc = "Ground X Speed (Latitude)"]
17387    pub vx: i16,
17388    #[doc = "Ground Y Speed (Longitude)"]
17389    pub vy: i16,
17390    #[doc = "Ground Z Speed (Altitude)"]
17391    pub vz: i16,
17392    #[doc = "Indicated airspeed"]
17393    pub ind_airspeed: u16,
17394    #[doc = "True airspeed"]
17395    pub true_airspeed: u16,
17396    #[doc = "X acceleration"]
17397    pub xacc: i16,
17398    #[doc = "Y acceleration"]
17399    pub yacc: i16,
17400    #[doc = "Z acceleration"]
17401    pub zacc: i16,
17402}
17403impl HIL_STATE_QUATERNION_DATA {
17404    pub const ENCODED_LEN: usize = 64usize;
17405    pub const DEFAULT: Self = Self {
17406        time_usec: 0_u64,
17407        attitude_quaternion: [0.0_f32; 4usize],
17408        rollspeed: 0.0_f32,
17409        pitchspeed: 0.0_f32,
17410        yawspeed: 0.0_f32,
17411        lat: 0_i32,
17412        lon: 0_i32,
17413        alt: 0_i32,
17414        vx: 0_i16,
17415        vy: 0_i16,
17416        vz: 0_i16,
17417        ind_airspeed: 0_u16,
17418        true_airspeed: 0_u16,
17419        xacc: 0_i16,
17420        yacc: 0_i16,
17421        zacc: 0_i16,
17422    };
17423    #[cfg(feature = "arbitrary")]
17424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17425        use arbitrary::{Arbitrary, Unstructured};
17426        let mut buf = [0u8; 1024];
17427        rng.fill_bytes(&mut buf);
17428        let mut unstructured = Unstructured::new(&buf);
17429        Self::arbitrary(&mut unstructured).unwrap_or_default()
17430    }
17431}
17432impl Default for HIL_STATE_QUATERNION_DATA {
17433    fn default() -> Self {
17434        Self::DEFAULT.clone()
17435    }
17436}
17437impl MessageData for HIL_STATE_QUATERNION_DATA {
17438    type Message = MavMessage;
17439    const ID: u32 = 115u32;
17440    const NAME: &'static str = "HIL_STATE_QUATERNION";
17441    const EXTRA_CRC: u8 = 4u8;
17442    const ENCODED_LEN: usize = 64usize;
17443    fn deser(
17444        _version: MavlinkVersion,
17445        __input: &[u8],
17446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17447        let avail_len = __input.len();
17448        let mut payload_buf = [0; Self::ENCODED_LEN];
17449        let mut buf = if avail_len < Self::ENCODED_LEN {
17450            payload_buf[0..avail_len].copy_from_slice(__input);
17451            Bytes::new(&payload_buf)
17452        } else {
17453            Bytes::new(__input)
17454        };
17455        let mut __struct = Self::default();
17456        __struct.time_usec = buf.get_u64_le();
17457        for v in &mut __struct.attitude_quaternion {
17458            let val = buf.get_f32_le();
17459            *v = val;
17460        }
17461        __struct.rollspeed = buf.get_f32_le();
17462        __struct.pitchspeed = buf.get_f32_le();
17463        __struct.yawspeed = buf.get_f32_le();
17464        __struct.lat = buf.get_i32_le();
17465        __struct.lon = buf.get_i32_le();
17466        __struct.alt = buf.get_i32_le();
17467        __struct.vx = buf.get_i16_le();
17468        __struct.vy = buf.get_i16_le();
17469        __struct.vz = buf.get_i16_le();
17470        __struct.ind_airspeed = buf.get_u16_le();
17471        __struct.true_airspeed = buf.get_u16_le();
17472        __struct.xacc = buf.get_i16_le();
17473        __struct.yacc = buf.get_i16_le();
17474        __struct.zacc = buf.get_i16_le();
17475        Ok(__struct)
17476    }
17477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17478        let mut __tmp = BytesMut::new(bytes);
17479        #[allow(clippy::absurd_extreme_comparisons)]
17480        #[allow(unused_comparisons)]
17481        if __tmp.remaining() < Self::ENCODED_LEN {
17482            panic!(
17483                "buffer is too small (need {} bytes, but got {})",
17484                Self::ENCODED_LEN,
17485                __tmp.remaining(),
17486            )
17487        }
17488        __tmp.put_u64_le(self.time_usec);
17489        for val in &self.attitude_quaternion {
17490            __tmp.put_f32_le(*val);
17491        }
17492        __tmp.put_f32_le(self.rollspeed);
17493        __tmp.put_f32_le(self.pitchspeed);
17494        __tmp.put_f32_le(self.yawspeed);
17495        __tmp.put_i32_le(self.lat);
17496        __tmp.put_i32_le(self.lon);
17497        __tmp.put_i32_le(self.alt);
17498        __tmp.put_i16_le(self.vx);
17499        __tmp.put_i16_le(self.vy);
17500        __tmp.put_i16_le(self.vz);
17501        __tmp.put_u16_le(self.ind_airspeed);
17502        __tmp.put_u16_le(self.true_airspeed);
17503        __tmp.put_i16_le(self.xacc);
17504        __tmp.put_i16_le(self.yacc);
17505        __tmp.put_i16_le(self.zacc);
17506        if matches!(version, MavlinkVersion::V2) {
17507            let len = __tmp.len();
17508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17509        } else {
17510            __tmp.len()
17511        }
17512    }
17513}
17514#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17515#[doc = ""]
17516#[doc = "ID: 242"]
17517#[derive(Debug, Clone, PartialEq)]
17518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17520#[cfg_attr(feature = "ts", derive(TS))]
17521#[cfg_attr(feature = "ts", ts(export))]
17522pub struct HOME_POSITION_DATA {
17523    #[doc = "Latitude (WGS84)"]
17524    pub latitude: i32,
17525    #[doc = "Longitude (WGS84)"]
17526    pub longitude: i32,
17527    #[doc = "Altitude (MSL). Positive for up."]
17528    pub altitude: i32,
17529    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17530    pub x: f32,
17531    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17532    pub y: f32,
17533    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17534    pub z: f32,
17535    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17536    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17537    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17538    pub q: [f32; 4],
17539    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17540    pub approach_x: f32,
17541    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17542    pub approach_y: f32,
17543    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17544    pub approach_z: f32,
17545    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17546    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17547    pub time_usec: u64,
17548}
17549impl HOME_POSITION_DATA {
17550    pub const ENCODED_LEN: usize = 60usize;
17551    pub const DEFAULT: Self = Self {
17552        latitude: 0_i32,
17553        longitude: 0_i32,
17554        altitude: 0_i32,
17555        x: 0.0_f32,
17556        y: 0.0_f32,
17557        z: 0.0_f32,
17558        q: [0.0_f32; 4usize],
17559        approach_x: 0.0_f32,
17560        approach_y: 0.0_f32,
17561        approach_z: 0.0_f32,
17562        time_usec: 0_u64,
17563    };
17564    #[cfg(feature = "arbitrary")]
17565    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17566        use arbitrary::{Arbitrary, Unstructured};
17567        let mut buf = [0u8; 1024];
17568        rng.fill_bytes(&mut buf);
17569        let mut unstructured = Unstructured::new(&buf);
17570        Self::arbitrary(&mut unstructured).unwrap_or_default()
17571    }
17572}
17573impl Default for HOME_POSITION_DATA {
17574    fn default() -> Self {
17575        Self::DEFAULT.clone()
17576    }
17577}
17578impl MessageData for HOME_POSITION_DATA {
17579    type Message = MavMessage;
17580    const ID: u32 = 242u32;
17581    const NAME: &'static str = "HOME_POSITION";
17582    const EXTRA_CRC: u8 = 104u8;
17583    const ENCODED_LEN: usize = 60usize;
17584    fn deser(
17585        _version: MavlinkVersion,
17586        __input: &[u8],
17587    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17588        let avail_len = __input.len();
17589        let mut payload_buf = [0; Self::ENCODED_LEN];
17590        let mut buf = if avail_len < Self::ENCODED_LEN {
17591            payload_buf[0..avail_len].copy_from_slice(__input);
17592            Bytes::new(&payload_buf)
17593        } else {
17594            Bytes::new(__input)
17595        };
17596        let mut __struct = Self::default();
17597        __struct.latitude = buf.get_i32_le();
17598        __struct.longitude = buf.get_i32_le();
17599        __struct.altitude = buf.get_i32_le();
17600        __struct.x = buf.get_f32_le();
17601        __struct.y = buf.get_f32_le();
17602        __struct.z = buf.get_f32_le();
17603        for v in &mut __struct.q {
17604            let val = buf.get_f32_le();
17605            *v = val;
17606        }
17607        __struct.approach_x = buf.get_f32_le();
17608        __struct.approach_y = buf.get_f32_le();
17609        __struct.approach_z = buf.get_f32_le();
17610        __struct.time_usec = buf.get_u64_le();
17611        Ok(__struct)
17612    }
17613    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17614        let mut __tmp = BytesMut::new(bytes);
17615        #[allow(clippy::absurd_extreme_comparisons)]
17616        #[allow(unused_comparisons)]
17617        if __tmp.remaining() < Self::ENCODED_LEN {
17618            panic!(
17619                "buffer is too small (need {} bytes, but got {})",
17620                Self::ENCODED_LEN,
17621                __tmp.remaining(),
17622            )
17623        }
17624        __tmp.put_i32_le(self.latitude);
17625        __tmp.put_i32_le(self.longitude);
17626        __tmp.put_i32_le(self.altitude);
17627        __tmp.put_f32_le(self.x);
17628        __tmp.put_f32_le(self.y);
17629        __tmp.put_f32_le(self.z);
17630        for val in &self.q {
17631            __tmp.put_f32_le(*val);
17632        }
17633        __tmp.put_f32_le(self.approach_x);
17634        __tmp.put_f32_le(self.approach_y);
17635        __tmp.put_f32_le(self.approach_z);
17636        if matches!(version, MavlinkVersion::V2) {
17637            __tmp.put_u64_le(self.time_usec);
17638            let len = __tmp.len();
17639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17640        } else {
17641            __tmp.len()
17642        }
17643    }
17644}
17645#[doc = "Temperature and humidity from hygrometer."]
17646#[doc = ""]
17647#[doc = "ID: 12920"]
17648#[derive(Debug, Clone, PartialEq)]
17649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17651#[cfg_attr(feature = "ts", derive(TS))]
17652#[cfg_attr(feature = "ts", ts(export))]
17653pub struct HYGROMETER_SENSOR_DATA {
17654    #[doc = "Temperature"]
17655    pub temperature: i16,
17656    #[doc = "Humidity"]
17657    pub humidity: u16,
17658    #[doc = "Hygrometer ID"]
17659    pub id: u8,
17660}
17661impl HYGROMETER_SENSOR_DATA {
17662    pub const ENCODED_LEN: usize = 5usize;
17663    pub const DEFAULT: Self = Self {
17664        temperature: 0_i16,
17665        humidity: 0_u16,
17666        id: 0_u8,
17667    };
17668    #[cfg(feature = "arbitrary")]
17669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17670        use arbitrary::{Arbitrary, Unstructured};
17671        let mut buf = [0u8; 1024];
17672        rng.fill_bytes(&mut buf);
17673        let mut unstructured = Unstructured::new(&buf);
17674        Self::arbitrary(&mut unstructured).unwrap_or_default()
17675    }
17676}
17677impl Default for HYGROMETER_SENSOR_DATA {
17678    fn default() -> Self {
17679        Self::DEFAULT.clone()
17680    }
17681}
17682impl MessageData for HYGROMETER_SENSOR_DATA {
17683    type Message = MavMessage;
17684    const ID: u32 = 12920u32;
17685    const NAME: &'static str = "HYGROMETER_SENSOR";
17686    const EXTRA_CRC: u8 = 20u8;
17687    const ENCODED_LEN: usize = 5usize;
17688    fn deser(
17689        _version: MavlinkVersion,
17690        __input: &[u8],
17691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17692        let avail_len = __input.len();
17693        let mut payload_buf = [0; Self::ENCODED_LEN];
17694        let mut buf = if avail_len < Self::ENCODED_LEN {
17695            payload_buf[0..avail_len].copy_from_slice(__input);
17696            Bytes::new(&payload_buf)
17697        } else {
17698            Bytes::new(__input)
17699        };
17700        let mut __struct = Self::default();
17701        __struct.temperature = buf.get_i16_le();
17702        __struct.humidity = buf.get_u16_le();
17703        __struct.id = buf.get_u8();
17704        Ok(__struct)
17705    }
17706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17707        let mut __tmp = BytesMut::new(bytes);
17708        #[allow(clippy::absurd_extreme_comparisons)]
17709        #[allow(unused_comparisons)]
17710        if __tmp.remaining() < Self::ENCODED_LEN {
17711            panic!(
17712                "buffer is too small (need {} bytes, but got {})",
17713                Self::ENCODED_LEN,
17714                __tmp.remaining(),
17715            )
17716        }
17717        __tmp.put_i16_le(self.temperature);
17718        __tmp.put_u16_le(self.humidity);
17719        __tmp.put_u8(self.id);
17720        if matches!(version, MavlinkVersion::V2) {
17721            let len = __tmp.len();
17722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17723        } else {
17724            __tmp.len()
17725        }
17726    }
17727}
17728#[doc = "Illuminator status."]
17729#[doc = ""]
17730#[doc = "ID: 440"]
17731#[derive(Debug, Clone, PartialEq)]
17732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17734#[cfg_attr(feature = "ts", derive(TS))]
17735#[cfg_attr(feature = "ts", ts(export))]
17736pub struct ILLUMINATOR_STATUS_DATA {
17737    #[doc = "Time since the start-up of the illuminator in ms"]
17738    pub uptime_ms: u32,
17739    #[doc = "Errors"]
17740    pub error_status: IlluminatorErrorFlags,
17741    #[doc = "Illuminator brightness"]
17742    pub brightness: f32,
17743    #[doc = "Illuminator strobing period in seconds"]
17744    pub strobe_period: f32,
17745    #[doc = "Illuminator strobing duty cycle"]
17746    pub strobe_duty_cycle: f32,
17747    #[doc = "Temperature in Celsius"]
17748    pub temp_c: f32,
17749    #[doc = "Minimum strobing period in seconds"]
17750    pub min_strobe_period: f32,
17751    #[doc = "Maximum strobing period in seconds"]
17752    pub max_strobe_period: f32,
17753    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17754    pub enable: u8,
17755    #[doc = "Supported illuminator modes"]
17756    pub mode_bitmask: IlluminatorMode,
17757    #[doc = "Illuminator mode"]
17758    pub mode: IlluminatorMode,
17759}
17760impl ILLUMINATOR_STATUS_DATA {
17761    pub const ENCODED_LEN: usize = 35usize;
17762    pub const DEFAULT: Self = Self {
17763        uptime_ms: 0_u32,
17764        error_status: IlluminatorErrorFlags::DEFAULT,
17765        brightness: 0.0_f32,
17766        strobe_period: 0.0_f32,
17767        strobe_duty_cycle: 0.0_f32,
17768        temp_c: 0.0_f32,
17769        min_strobe_period: 0.0_f32,
17770        max_strobe_period: 0.0_f32,
17771        enable: 0_u8,
17772        mode_bitmask: IlluminatorMode::DEFAULT,
17773        mode: IlluminatorMode::DEFAULT,
17774    };
17775    #[cfg(feature = "arbitrary")]
17776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17777        use arbitrary::{Arbitrary, Unstructured};
17778        let mut buf = [0u8; 1024];
17779        rng.fill_bytes(&mut buf);
17780        let mut unstructured = Unstructured::new(&buf);
17781        Self::arbitrary(&mut unstructured).unwrap_or_default()
17782    }
17783}
17784impl Default for ILLUMINATOR_STATUS_DATA {
17785    fn default() -> Self {
17786        Self::DEFAULT.clone()
17787    }
17788}
17789impl MessageData for ILLUMINATOR_STATUS_DATA {
17790    type Message = MavMessage;
17791    const ID: u32 = 440u32;
17792    const NAME: &'static str = "ILLUMINATOR_STATUS";
17793    const EXTRA_CRC: u8 = 66u8;
17794    const ENCODED_LEN: usize = 35usize;
17795    fn deser(
17796        _version: MavlinkVersion,
17797        __input: &[u8],
17798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17799        let avail_len = __input.len();
17800        let mut payload_buf = [0; Self::ENCODED_LEN];
17801        let mut buf = if avail_len < Self::ENCODED_LEN {
17802            payload_buf[0..avail_len].copy_from_slice(__input);
17803            Bytes::new(&payload_buf)
17804        } else {
17805            Bytes::new(__input)
17806        };
17807        let mut __struct = Self::default();
17808        __struct.uptime_ms = buf.get_u32_le();
17809        let tmp = buf.get_u32_le();
17810        __struct.error_status = IlluminatorErrorFlags::from_bits(tmp).ok_or(
17811            ::mavlink_core::error::ParserError::InvalidFlag {
17812                flag_type: "IlluminatorErrorFlags",
17813                value: tmp as u64,
17814            },
17815        )?;
17816        __struct.brightness = buf.get_f32_le();
17817        __struct.strobe_period = buf.get_f32_le();
17818        __struct.strobe_duty_cycle = buf.get_f32_le();
17819        __struct.temp_c = buf.get_f32_le();
17820        __struct.min_strobe_period = buf.get_f32_le();
17821        __struct.max_strobe_period = buf.get_f32_le();
17822        __struct.enable = buf.get_u8();
17823        let tmp = buf.get_u8();
17824        __struct.mode_bitmask =
17825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17826                enum_type: "IlluminatorMode",
17827                value: tmp as u64,
17828            })?;
17829        let tmp = buf.get_u8();
17830        __struct.mode =
17831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17832                enum_type: "IlluminatorMode",
17833                value: tmp as u64,
17834            })?;
17835        Ok(__struct)
17836    }
17837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17838        let mut __tmp = BytesMut::new(bytes);
17839        #[allow(clippy::absurd_extreme_comparisons)]
17840        #[allow(unused_comparisons)]
17841        if __tmp.remaining() < Self::ENCODED_LEN {
17842            panic!(
17843                "buffer is too small (need {} bytes, but got {})",
17844                Self::ENCODED_LEN,
17845                __tmp.remaining(),
17846            )
17847        }
17848        __tmp.put_u32_le(self.uptime_ms);
17849        __tmp.put_u32_le(self.error_status.bits());
17850        __tmp.put_f32_le(self.brightness);
17851        __tmp.put_f32_le(self.strobe_period);
17852        __tmp.put_f32_le(self.strobe_duty_cycle);
17853        __tmp.put_f32_le(self.temp_c);
17854        __tmp.put_f32_le(self.min_strobe_period);
17855        __tmp.put_f32_le(self.max_strobe_period);
17856        __tmp.put_u8(self.enable);
17857        __tmp.put_u8(self.mode_bitmask as u8);
17858        __tmp.put_u8(self.mode as u8);
17859        if matches!(version, MavlinkVersion::V2) {
17860            let len = __tmp.len();
17861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17862        } else {
17863            __tmp.len()
17864        }
17865    }
17866}
17867#[doc = "Status of the Iridium SBD link."]
17868#[doc = ""]
17869#[doc = "ID: 335"]
17870#[derive(Debug, Clone, PartialEq)]
17871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17873#[cfg_attr(feature = "ts", derive(TS))]
17874#[cfg_attr(feature = "ts", ts(export))]
17875pub struct ISBD_LINK_STATUS_DATA {
17876    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17877    pub timestamp: u64,
17878    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17879    pub last_heartbeat: u64,
17880    #[doc = "Number of failed SBD sessions."]
17881    pub failed_sessions: u16,
17882    #[doc = "Number of successful SBD sessions."]
17883    pub successful_sessions: u16,
17884    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17885    pub signal_quality: u8,
17886    #[doc = "1: Ring call pending, 0: No call pending."]
17887    pub ring_pending: u8,
17888    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17889    pub tx_session_pending: u8,
17890    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17891    pub rx_session_pending: u8,
17892}
17893impl ISBD_LINK_STATUS_DATA {
17894    pub const ENCODED_LEN: usize = 24usize;
17895    pub const DEFAULT: Self = Self {
17896        timestamp: 0_u64,
17897        last_heartbeat: 0_u64,
17898        failed_sessions: 0_u16,
17899        successful_sessions: 0_u16,
17900        signal_quality: 0_u8,
17901        ring_pending: 0_u8,
17902        tx_session_pending: 0_u8,
17903        rx_session_pending: 0_u8,
17904    };
17905    #[cfg(feature = "arbitrary")]
17906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17907        use arbitrary::{Arbitrary, Unstructured};
17908        let mut buf = [0u8; 1024];
17909        rng.fill_bytes(&mut buf);
17910        let mut unstructured = Unstructured::new(&buf);
17911        Self::arbitrary(&mut unstructured).unwrap_or_default()
17912    }
17913}
17914impl Default for ISBD_LINK_STATUS_DATA {
17915    fn default() -> Self {
17916        Self::DEFAULT.clone()
17917    }
17918}
17919impl MessageData for ISBD_LINK_STATUS_DATA {
17920    type Message = MavMessage;
17921    const ID: u32 = 335u32;
17922    const NAME: &'static str = "ISBD_LINK_STATUS";
17923    const EXTRA_CRC: u8 = 225u8;
17924    const ENCODED_LEN: usize = 24usize;
17925    fn deser(
17926        _version: MavlinkVersion,
17927        __input: &[u8],
17928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17929        let avail_len = __input.len();
17930        let mut payload_buf = [0; Self::ENCODED_LEN];
17931        let mut buf = if avail_len < Self::ENCODED_LEN {
17932            payload_buf[0..avail_len].copy_from_slice(__input);
17933            Bytes::new(&payload_buf)
17934        } else {
17935            Bytes::new(__input)
17936        };
17937        let mut __struct = Self::default();
17938        __struct.timestamp = buf.get_u64_le();
17939        __struct.last_heartbeat = buf.get_u64_le();
17940        __struct.failed_sessions = buf.get_u16_le();
17941        __struct.successful_sessions = buf.get_u16_le();
17942        __struct.signal_quality = buf.get_u8();
17943        __struct.ring_pending = buf.get_u8();
17944        __struct.tx_session_pending = buf.get_u8();
17945        __struct.rx_session_pending = buf.get_u8();
17946        Ok(__struct)
17947    }
17948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17949        let mut __tmp = BytesMut::new(bytes);
17950        #[allow(clippy::absurd_extreme_comparisons)]
17951        #[allow(unused_comparisons)]
17952        if __tmp.remaining() < Self::ENCODED_LEN {
17953            panic!(
17954                "buffer is too small (need {} bytes, but got {})",
17955                Self::ENCODED_LEN,
17956                __tmp.remaining(),
17957            )
17958        }
17959        __tmp.put_u64_le(self.timestamp);
17960        __tmp.put_u64_le(self.last_heartbeat);
17961        __tmp.put_u16_le(self.failed_sessions);
17962        __tmp.put_u16_le(self.successful_sessions);
17963        __tmp.put_u8(self.signal_quality);
17964        __tmp.put_u8(self.ring_pending);
17965        __tmp.put_u8(self.tx_session_pending);
17966        __tmp.put_u8(self.rx_session_pending);
17967        if matches!(version, MavlinkVersion::V2) {
17968            let len = __tmp.len();
17969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17970        } else {
17971            __tmp.len()
17972        }
17973    }
17974}
17975#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17976#[doc = ""]
17977#[doc = "ID: 149"]
17978#[derive(Debug, Clone, PartialEq)]
17979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17981#[cfg_attr(feature = "ts", derive(TS))]
17982#[cfg_attr(feature = "ts", ts(export))]
17983pub struct LANDING_TARGET_DATA {
17984    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17985    pub time_usec: u64,
17986    #[doc = "X-axis angular offset of the target from the center of the image"]
17987    pub angle_x: f32,
17988    #[doc = "Y-axis angular offset of the target from the center of the image"]
17989    pub angle_y: f32,
17990    #[doc = "Distance to the target from the vehicle"]
17991    pub distance: f32,
17992    #[doc = "Size of target along x-axis"]
17993    pub size_x: f32,
17994    #[doc = "Size of target along y-axis"]
17995    pub size_y: f32,
17996    #[doc = "The ID of the target if multiple targets are present"]
17997    pub target_num: u8,
17998    #[doc = "Coordinate frame used for following fields."]
17999    pub frame: MavFrame,
18000    #[doc = "X Position of the landing target in MAV_FRAME"]
18001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18002    pub x: f32,
18003    #[doc = "Y Position of the landing target in MAV_FRAME"]
18004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18005    pub y: f32,
18006    #[doc = "Z Position of the landing target in MAV_FRAME"]
18007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18008    pub z: f32,
18009    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18010    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18011    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18012    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18013    pub q: [f32; 4],
18014    #[doc = "Type of landing target"]
18015    #[cfg_attr(feature = "serde", serde(default))]
18016    pub mavtype: LandingTargetType,
18017    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18019    pub position_valid: u8,
18020}
18021impl LANDING_TARGET_DATA {
18022    pub const ENCODED_LEN: usize = 60usize;
18023    pub const DEFAULT: Self = Self {
18024        time_usec: 0_u64,
18025        angle_x: 0.0_f32,
18026        angle_y: 0.0_f32,
18027        distance: 0.0_f32,
18028        size_x: 0.0_f32,
18029        size_y: 0.0_f32,
18030        target_num: 0_u8,
18031        frame: MavFrame::DEFAULT,
18032        x: 0.0_f32,
18033        y: 0.0_f32,
18034        z: 0.0_f32,
18035        q: [0.0_f32; 4usize],
18036        mavtype: LandingTargetType::DEFAULT,
18037        position_valid: 0_u8,
18038    };
18039    #[cfg(feature = "arbitrary")]
18040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18041        use arbitrary::{Arbitrary, Unstructured};
18042        let mut buf = [0u8; 1024];
18043        rng.fill_bytes(&mut buf);
18044        let mut unstructured = Unstructured::new(&buf);
18045        Self::arbitrary(&mut unstructured).unwrap_or_default()
18046    }
18047}
18048impl Default for LANDING_TARGET_DATA {
18049    fn default() -> Self {
18050        Self::DEFAULT.clone()
18051    }
18052}
18053impl MessageData for LANDING_TARGET_DATA {
18054    type Message = MavMessage;
18055    const ID: u32 = 149u32;
18056    const NAME: &'static str = "LANDING_TARGET";
18057    const EXTRA_CRC: u8 = 200u8;
18058    const ENCODED_LEN: usize = 60usize;
18059    fn deser(
18060        _version: MavlinkVersion,
18061        __input: &[u8],
18062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18063        let avail_len = __input.len();
18064        let mut payload_buf = [0; Self::ENCODED_LEN];
18065        let mut buf = if avail_len < Self::ENCODED_LEN {
18066            payload_buf[0..avail_len].copy_from_slice(__input);
18067            Bytes::new(&payload_buf)
18068        } else {
18069            Bytes::new(__input)
18070        };
18071        let mut __struct = Self::default();
18072        __struct.time_usec = buf.get_u64_le();
18073        __struct.angle_x = buf.get_f32_le();
18074        __struct.angle_y = buf.get_f32_le();
18075        __struct.distance = buf.get_f32_le();
18076        __struct.size_x = buf.get_f32_le();
18077        __struct.size_y = buf.get_f32_le();
18078        __struct.target_num = buf.get_u8();
18079        let tmp = buf.get_u8();
18080        __struct.frame =
18081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18082                enum_type: "MavFrame",
18083                value: tmp as u64,
18084            })?;
18085        __struct.x = buf.get_f32_le();
18086        __struct.y = buf.get_f32_le();
18087        __struct.z = buf.get_f32_le();
18088        for v in &mut __struct.q {
18089            let val = buf.get_f32_le();
18090            *v = val;
18091        }
18092        let tmp = buf.get_u8();
18093        __struct.mavtype =
18094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18095                enum_type: "LandingTargetType",
18096                value: tmp as u64,
18097            })?;
18098        __struct.position_valid = buf.get_u8();
18099        Ok(__struct)
18100    }
18101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18102        let mut __tmp = BytesMut::new(bytes);
18103        #[allow(clippy::absurd_extreme_comparisons)]
18104        #[allow(unused_comparisons)]
18105        if __tmp.remaining() < Self::ENCODED_LEN {
18106            panic!(
18107                "buffer is too small (need {} bytes, but got {})",
18108                Self::ENCODED_LEN,
18109                __tmp.remaining(),
18110            )
18111        }
18112        __tmp.put_u64_le(self.time_usec);
18113        __tmp.put_f32_le(self.angle_x);
18114        __tmp.put_f32_le(self.angle_y);
18115        __tmp.put_f32_le(self.distance);
18116        __tmp.put_f32_le(self.size_x);
18117        __tmp.put_f32_le(self.size_y);
18118        __tmp.put_u8(self.target_num);
18119        __tmp.put_u8(self.frame as u8);
18120        if matches!(version, MavlinkVersion::V2) {
18121            __tmp.put_f32_le(self.x);
18122            __tmp.put_f32_le(self.y);
18123            __tmp.put_f32_le(self.z);
18124            for val in &self.q {
18125                __tmp.put_f32_le(*val);
18126            }
18127            __tmp.put_u8(self.mavtype as u8);
18128            __tmp.put_u8(self.position_valid);
18129            let len = __tmp.len();
18130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18131        } else {
18132            __tmp.len()
18133        }
18134    }
18135}
18136#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18137#[doc = ""]
18138#[doc = "ID: 8"]
18139#[derive(Debug, Clone, PartialEq)]
18140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18142#[cfg_attr(feature = "ts", derive(TS))]
18143#[cfg_attr(feature = "ts", ts(export))]
18144pub struct LINK_NODE_STATUS_DATA {
18145    #[doc = "Timestamp (time since system boot)."]
18146    pub timestamp: u64,
18147    #[doc = "Transmit rate"]
18148    pub tx_rate: u32,
18149    #[doc = "Receive rate"]
18150    pub rx_rate: u32,
18151    #[doc = "Messages sent"]
18152    pub messages_sent: u32,
18153    #[doc = "Messages received (estimated from counting seq)"]
18154    pub messages_received: u32,
18155    #[doc = "Messages lost (estimated from counting seq)"]
18156    pub messages_lost: u32,
18157    #[doc = "Number of bytes that could not be parsed correctly."]
18158    pub rx_parse_err: u16,
18159    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18160    pub tx_overflows: u16,
18161    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18162    pub rx_overflows: u16,
18163    #[doc = "Remaining free transmit buffer space"]
18164    pub tx_buf: u8,
18165    #[doc = "Remaining free receive buffer space"]
18166    pub rx_buf: u8,
18167}
18168impl LINK_NODE_STATUS_DATA {
18169    pub const ENCODED_LEN: usize = 36usize;
18170    pub const DEFAULT: Self = Self {
18171        timestamp: 0_u64,
18172        tx_rate: 0_u32,
18173        rx_rate: 0_u32,
18174        messages_sent: 0_u32,
18175        messages_received: 0_u32,
18176        messages_lost: 0_u32,
18177        rx_parse_err: 0_u16,
18178        tx_overflows: 0_u16,
18179        rx_overflows: 0_u16,
18180        tx_buf: 0_u8,
18181        rx_buf: 0_u8,
18182    };
18183    #[cfg(feature = "arbitrary")]
18184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18185        use arbitrary::{Arbitrary, Unstructured};
18186        let mut buf = [0u8; 1024];
18187        rng.fill_bytes(&mut buf);
18188        let mut unstructured = Unstructured::new(&buf);
18189        Self::arbitrary(&mut unstructured).unwrap_or_default()
18190    }
18191}
18192impl Default for LINK_NODE_STATUS_DATA {
18193    fn default() -> Self {
18194        Self::DEFAULT.clone()
18195    }
18196}
18197impl MessageData for LINK_NODE_STATUS_DATA {
18198    type Message = MavMessage;
18199    const ID: u32 = 8u32;
18200    const NAME: &'static str = "LINK_NODE_STATUS";
18201    const EXTRA_CRC: u8 = 117u8;
18202    const ENCODED_LEN: usize = 36usize;
18203    fn deser(
18204        _version: MavlinkVersion,
18205        __input: &[u8],
18206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18207        let avail_len = __input.len();
18208        let mut payload_buf = [0; Self::ENCODED_LEN];
18209        let mut buf = if avail_len < Self::ENCODED_LEN {
18210            payload_buf[0..avail_len].copy_from_slice(__input);
18211            Bytes::new(&payload_buf)
18212        } else {
18213            Bytes::new(__input)
18214        };
18215        let mut __struct = Self::default();
18216        __struct.timestamp = buf.get_u64_le();
18217        __struct.tx_rate = buf.get_u32_le();
18218        __struct.rx_rate = buf.get_u32_le();
18219        __struct.messages_sent = buf.get_u32_le();
18220        __struct.messages_received = buf.get_u32_le();
18221        __struct.messages_lost = buf.get_u32_le();
18222        __struct.rx_parse_err = buf.get_u16_le();
18223        __struct.tx_overflows = buf.get_u16_le();
18224        __struct.rx_overflows = buf.get_u16_le();
18225        __struct.tx_buf = buf.get_u8();
18226        __struct.rx_buf = buf.get_u8();
18227        Ok(__struct)
18228    }
18229    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18230        let mut __tmp = BytesMut::new(bytes);
18231        #[allow(clippy::absurd_extreme_comparisons)]
18232        #[allow(unused_comparisons)]
18233        if __tmp.remaining() < Self::ENCODED_LEN {
18234            panic!(
18235                "buffer is too small (need {} bytes, but got {})",
18236                Self::ENCODED_LEN,
18237                __tmp.remaining(),
18238            )
18239        }
18240        __tmp.put_u64_le(self.timestamp);
18241        __tmp.put_u32_le(self.tx_rate);
18242        __tmp.put_u32_le(self.rx_rate);
18243        __tmp.put_u32_le(self.messages_sent);
18244        __tmp.put_u32_le(self.messages_received);
18245        __tmp.put_u32_le(self.messages_lost);
18246        __tmp.put_u16_le(self.rx_parse_err);
18247        __tmp.put_u16_le(self.tx_overflows);
18248        __tmp.put_u16_le(self.rx_overflows);
18249        __tmp.put_u8(self.tx_buf);
18250        __tmp.put_u8(self.rx_buf);
18251        if matches!(version, MavlinkVersion::V2) {
18252            let len = __tmp.len();
18253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18254        } else {
18255            __tmp.len()
18256        }
18257    }
18258}
18259#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18260#[doc = ""]
18261#[doc = "ID: 32"]
18262#[derive(Debug, Clone, PartialEq)]
18263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18265#[cfg_attr(feature = "ts", derive(TS))]
18266#[cfg_attr(feature = "ts", ts(export))]
18267pub struct LOCAL_POSITION_NED_DATA {
18268    #[doc = "Timestamp (time since system boot)."]
18269    pub time_boot_ms: u32,
18270    #[doc = "X Position"]
18271    pub x: f32,
18272    #[doc = "Y Position"]
18273    pub y: f32,
18274    #[doc = "Z Position"]
18275    pub z: f32,
18276    #[doc = "X Speed"]
18277    pub vx: f32,
18278    #[doc = "Y Speed"]
18279    pub vy: f32,
18280    #[doc = "Z Speed"]
18281    pub vz: f32,
18282}
18283impl LOCAL_POSITION_NED_DATA {
18284    pub const ENCODED_LEN: usize = 28usize;
18285    pub const DEFAULT: Self = Self {
18286        time_boot_ms: 0_u32,
18287        x: 0.0_f32,
18288        y: 0.0_f32,
18289        z: 0.0_f32,
18290        vx: 0.0_f32,
18291        vy: 0.0_f32,
18292        vz: 0.0_f32,
18293    };
18294    #[cfg(feature = "arbitrary")]
18295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18296        use arbitrary::{Arbitrary, Unstructured};
18297        let mut buf = [0u8; 1024];
18298        rng.fill_bytes(&mut buf);
18299        let mut unstructured = Unstructured::new(&buf);
18300        Self::arbitrary(&mut unstructured).unwrap_or_default()
18301    }
18302}
18303impl Default for LOCAL_POSITION_NED_DATA {
18304    fn default() -> Self {
18305        Self::DEFAULT.clone()
18306    }
18307}
18308impl MessageData for LOCAL_POSITION_NED_DATA {
18309    type Message = MavMessage;
18310    const ID: u32 = 32u32;
18311    const NAME: &'static str = "LOCAL_POSITION_NED";
18312    const EXTRA_CRC: u8 = 185u8;
18313    const ENCODED_LEN: usize = 28usize;
18314    fn deser(
18315        _version: MavlinkVersion,
18316        __input: &[u8],
18317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18318        let avail_len = __input.len();
18319        let mut payload_buf = [0; Self::ENCODED_LEN];
18320        let mut buf = if avail_len < Self::ENCODED_LEN {
18321            payload_buf[0..avail_len].copy_from_slice(__input);
18322            Bytes::new(&payload_buf)
18323        } else {
18324            Bytes::new(__input)
18325        };
18326        let mut __struct = Self::default();
18327        __struct.time_boot_ms = buf.get_u32_le();
18328        __struct.x = buf.get_f32_le();
18329        __struct.y = buf.get_f32_le();
18330        __struct.z = buf.get_f32_le();
18331        __struct.vx = buf.get_f32_le();
18332        __struct.vy = buf.get_f32_le();
18333        __struct.vz = buf.get_f32_le();
18334        Ok(__struct)
18335    }
18336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18337        let mut __tmp = BytesMut::new(bytes);
18338        #[allow(clippy::absurd_extreme_comparisons)]
18339        #[allow(unused_comparisons)]
18340        if __tmp.remaining() < Self::ENCODED_LEN {
18341            panic!(
18342                "buffer is too small (need {} bytes, but got {})",
18343                Self::ENCODED_LEN,
18344                __tmp.remaining(),
18345            )
18346        }
18347        __tmp.put_u32_le(self.time_boot_ms);
18348        __tmp.put_f32_le(self.x);
18349        __tmp.put_f32_le(self.y);
18350        __tmp.put_f32_le(self.z);
18351        __tmp.put_f32_le(self.vx);
18352        __tmp.put_f32_le(self.vy);
18353        __tmp.put_f32_le(self.vz);
18354        if matches!(version, MavlinkVersion::V2) {
18355            let len = __tmp.len();
18356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18357        } else {
18358            __tmp.len()
18359        }
18360    }
18361}
18362#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18363#[doc = ""]
18364#[doc = "ID: 64"]
18365#[derive(Debug, Clone, PartialEq)]
18366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18368#[cfg_attr(feature = "ts", derive(TS))]
18369#[cfg_attr(feature = "ts", ts(export))]
18370pub struct LOCAL_POSITION_NED_COV_DATA {
18371    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18372    pub time_usec: u64,
18373    #[doc = "X Position"]
18374    pub x: f32,
18375    #[doc = "Y Position"]
18376    pub y: f32,
18377    #[doc = "Z Position"]
18378    pub z: f32,
18379    #[doc = "X Speed"]
18380    pub vx: f32,
18381    #[doc = "Y Speed"]
18382    pub vy: f32,
18383    #[doc = "Z Speed"]
18384    pub vz: f32,
18385    #[doc = "X Acceleration"]
18386    pub ax: f32,
18387    #[doc = "Y Acceleration"]
18388    pub ay: f32,
18389    #[doc = "Z Acceleration"]
18390    pub az: f32,
18391    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18392    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18393    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18394    pub covariance: [f32; 45],
18395    #[doc = "Class id of the estimator this estimate originated from."]
18396    pub estimator_type: MavEstimatorType,
18397}
18398impl LOCAL_POSITION_NED_COV_DATA {
18399    pub const ENCODED_LEN: usize = 225usize;
18400    pub const DEFAULT: Self = Self {
18401        time_usec: 0_u64,
18402        x: 0.0_f32,
18403        y: 0.0_f32,
18404        z: 0.0_f32,
18405        vx: 0.0_f32,
18406        vy: 0.0_f32,
18407        vz: 0.0_f32,
18408        ax: 0.0_f32,
18409        ay: 0.0_f32,
18410        az: 0.0_f32,
18411        covariance: [0.0_f32; 45usize],
18412        estimator_type: MavEstimatorType::DEFAULT,
18413    };
18414    #[cfg(feature = "arbitrary")]
18415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18416        use arbitrary::{Arbitrary, Unstructured};
18417        let mut buf = [0u8; 1024];
18418        rng.fill_bytes(&mut buf);
18419        let mut unstructured = Unstructured::new(&buf);
18420        Self::arbitrary(&mut unstructured).unwrap_or_default()
18421    }
18422}
18423impl Default for LOCAL_POSITION_NED_COV_DATA {
18424    fn default() -> Self {
18425        Self::DEFAULT.clone()
18426    }
18427}
18428impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18429    type Message = MavMessage;
18430    const ID: u32 = 64u32;
18431    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18432    const EXTRA_CRC: u8 = 191u8;
18433    const ENCODED_LEN: usize = 225usize;
18434    fn deser(
18435        _version: MavlinkVersion,
18436        __input: &[u8],
18437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18438        let avail_len = __input.len();
18439        let mut payload_buf = [0; Self::ENCODED_LEN];
18440        let mut buf = if avail_len < Self::ENCODED_LEN {
18441            payload_buf[0..avail_len].copy_from_slice(__input);
18442            Bytes::new(&payload_buf)
18443        } else {
18444            Bytes::new(__input)
18445        };
18446        let mut __struct = Self::default();
18447        __struct.time_usec = buf.get_u64_le();
18448        __struct.x = buf.get_f32_le();
18449        __struct.y = buf.get_f32_le();
18450        __struct.z = buf.get_f32_le();
18451        __struct.vx = buf.get_f32_le();
18452        __struct.vy = buf.get_f32_le();
18453        __struct.vz = buf.get_f32_le();
18454        __struct.ax = buf.get_f32_le();
18455        __struct.ay = buf.get_f32_le();
18456        __struct.az = buf.get_f32_le();
18457        for v in &mut __struct.covariance {
18458            let val = buf.get_f32_le();
18459            *v = val;
18460        }
18461        let tmp = buf.get_u8();
18462        __struct.estimator_type =
18463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18464                enum_type: "MavEstimatorType",
18465                value: tmp as u64,
18466            })?;
18467        Ok(__struct)
18468    }
18469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18470        let mut __tmp = BytesMut::new(bytes);
18471        #[allow(clippy::absurd_extreme_comparisons)]
18472        #[allow(unused_comparisons)]
18473        if __tmp.remaining() < Self::ENCODED_LEN {
18474            panic!(
18475                "buffer is too small (need {} bytes, but got {})",
18476                Self::ENCODED_LEN,
18477                __tmp.remaining(),
18478            )
18479        }
18480        __tmp.put_u64_le(self.time_usec);
18481        __tmp.put_f32_le(self.x);
18482        __tmp.put_f32_le(self.y);
18483        __tmp.put_f32_le(self.z);
18484        __tmp.put_f32_le(self.vx);
18485        __tmp.put_f32_le(self.vy);
18486        __tmp.put_f32_le(self.vz);
18487        __tmp.put_f32_le(self.ax);
18488        __tmp.put_f32_le(self.ay);
18489        __tmp.put_f32_le(self.az);
18490        for val in &self.covariance {
18491            __tmp.put_f32_le(*val);
18492        }
18493        __tmp.put_u8(self.estimator_type as u8);
18494        if matches!(version, MavlinkVersion::V2) {
18495            let len = __tmp.len();
18496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18497        } else {
18498            __tmp.len()
18499        }
18500    }
18501}
18502#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18503#[doc = ""]
18504#[doc = "ID: 89"]
18505#[derive(Debug, Clone, PartialEq)]
18506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18508#[cfg_attr(feature = "ts", derive(TS))]
18509#[cfg_attr(feature = "ts", ts(export))]
18510pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18511    #[doc = "Timestamp (time since system boot)."]
18512    pub time_boot_ms: u32,
18513    #[doc = "X Position"]
18514    pub x: f32,
18515    #[doc = "Y Position"]
18516    pub y: f32,
18517    #[doc = "Z Position"]
18518    pub z: f32,
18519    #[doc = "Roll"]
18520    pub roll: f32,
18521    #[doc = "Pitch"]
18522    pub pitch: f32,
18523    #[doc = "Yaw"]
18524    pub yaw: f32,
18525}
18526impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18527    pub const ENCODED_LEN: usize = 28usize;
18528    pub const DEFAULT: Self = Self {
18529        time_boot_ms: 0_u32,
18530        x: 0.0_f32,
18531        y: 0.0_f32,
18532        z: 0.0_f32,
18533        roll: 0.0_f32,
18534        pitch: 0.0_f32,
18535        yaw: 0.0_f32,
18536    };
18537    #[cfg(feature = "arbitrary")]
18538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18539        use arbitrary::{Arbitrary, Unstructured};
18540        let mut buf = [0u8; 1024];
18541        rng.fill_bytes(&mut buf);
18542        let mut unstructured = Unstructured::new(&buf);
18543        Self::arbitrary(&mut unstructured).unwrap_or_default()
18544    }
18545}
18546impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18547    fn default() -> Self {
18548        Self::DEFAULT.clone()
18549    }
18550}
18551impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18552    type Message = MavMessage;
18553    const ID: u32 = 89u32;
18554    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18555    const EXTRA_CRC: u8 = 231u8;
18556    const ENCODED_LEN: usize = 28usize;
18557    fn deser(
18558        _version: MavlinkVersion,
18559        __input: &[u8],
18560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18561        let avail_len = __input.len();
18562        let mut payload_buf = [0; Self::ENCODED_LEN];
18563        let mut buf = if avail_len < Self::ENCODED_LEN {
18564            payload_buf[0..avail_len].copy_from_slice(__input);
18565            Bytes::new(&payload_buf)
18566        } else {
18567            Bytes::new(__input)
18568        };
18569        let mut __struct = Self::default();
18570        __struct.time_boot_ms = buf.get_u32_le();
18571        __struct.x = buf.get_f32_le();
18572        __struct.y = buf.get_f32_le();
18573        __struct.z = buf.get_f32_le();
18574        __struct.roll = buf.get_f32_le();
18575        __struct.pitch = buf.get_f32_le();
18576        __struct.yaw = buf.get_f32_le();
18577        Ok(__struct)
18578    }
18579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18580        let mut __tmp = BytesMut::new(bytes);
18581        #[allow(clippy::absurd_extreme_comparisons)]
18582        #[allow(unused_comparisons)]
18583        if __tmp.remaining() < Self::ENCODED_LEN {
18584            panic!(
18585                "buffer is too small (need {} bytes, but got {})",
18586                Self::ENCODED_LEN,
18587                __tmp.remaining(),
18588            )
18589        }
18590        __tmp.put_u32_le(self.time_boot_ms);
18591        __tmp.put_f32_le(self.x);
18592        __tmp.put_f32_le(self.y);
18593        __tmp.put_f32_le(self.z);
18594        __tmp.put_f32_le(self.roll);
18595        __tmp.put_f32_le(self.pitch);
18596        __tmp.put_f32_le(self.yaw);
18597        if matches!(version, MavlinkVersion::V2) {
18598            let len = __tmp.len();
18599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18600        } else {
18601            __tmp.len()
18602        }
18603    }
18604}
18605#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18606#[doc = ""]
18607#[doc = "ID: 268"]
18608#[derive(Debug, Clone, PartialEq)]
18609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18611#[cfg_attr(feature = "ts", derive(TS))]
18612#[cfg_attr(feature = "ts", ts(export))]
18613pub struct LOGGING_ACK_DATA {
18614    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18615    pub sequence: u16,
18616    #[doc = "system ID of the target"]
18617    pub target_system: u8,
18618    #[doc = "component ID of the target"]
18619    pub target_component: u8,
18620}
18621impl LOGGING_ACK_DATA {
18622    pub const ENCODED_LEN: usize = 4usize;
18623    pub const DEFAULT: Self = Self {
18624        sequence: 0_u16,
18625        target_system: 0_u8,
18626        target_component: 0_u8,
18627    };
18628    #[cfg(feature = "arbitrary")]
18629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18630        use arbitrary::{Arbitrary, Unstructured};
18631        let mut buf = [0u8; 1024];
18632        rng.fill_bytes(&mut buf);
18633        let mut unstructured = Unstructured::new(&buf);
18634        Self::arbitrary(&mut unstructured).unwrap_or_default()
18635    }
18636}
18637impl Default for LOGGING_ACK_DATA {
18638    fn default() -> Self {
18639        Self::DEFAULT.clone()
18640    }
18641}
18642impl MessageData for LOGGING_ACK_DATA {
18643    type Message = MavMessage;
18644    const ID: u32 = 268u32;
18645    const NAME: &'static str = "LOGGING_ACK";
18646    const EXTRA_CRC: u8 = 14u8;
18647    const ENCODED_LEN: usize = 4usize;
18648    fn deser(
18649        _version: MavlinkVersion,
18650        __input: &[u8],
18651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18652        let avail_len = __input.len();
18653        let mut payload_buf = [0; Self::ENCODED_LEN];
18654        let mut buf = if avail_len < Self::ENCODED_LEN {
18655            payload_buf[0..avail_len].copy_from_slice(__input);
18656            Bytes::new(&payload_buf)
18657        } else {
18658            Bytes::new(__input)
18659        };
18660        let mut __struct = Self::default();
18661        __struct.sequence = buf.get_u16_le();
18662        __struct.target_system = buf.get_u8();
18663        __struct.target_component = buf.get_u8();
18664        Ok(__struct)
18665    }
18666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18667        let mut __tmp = BytesMut::new(bytes);
18668        #[allow(clippy::absurd_extreme_comparisons)]
18669        #[allow(unused_comparisons)]
18670        if __tmp.remaining() < Self::ENCODED_LEN {
18671            panic!(
18672                "buffer is too small (need {} bytes, but got {})",
18673                Self::ENCODED_LEN,
18674                __tmp.remaining(),
18675            )
18676        }
18677        __tmp.put_u16_le(self.sequence);
18678        __tmp.put_u8(self.target_system);
18679        __tmp.put_u8(self.target_component);
18680        if matches!(version, MavlinkVersion::V2) {
18681            let len = __tmp.len();
18682            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18683        } else {
18684            __tmp.len()
18685        }
18686    }
18687}
18688#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18689#[doc = ""]
18690#[doc = "ID: 266"]
18691#[derive(Debug, Clone, PartialEq)]
18692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18693#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18694#[cfg_attr(feature = "ts", derive(TS))]
18695#[cfg_attr(feature = "ts", ts(export))]
18696pub struct LOGGING_DATA_DATA {
18697    #[doc = "sequence number (can wrap)"]
18698    pub sequence: u16,
18699    #[doc = "system ID of the target"]
18700    pub target_system: u8,
18701    #[doc = "component ID of the target"]
18702    pub target_component: u8,
18703    #[doc = "data length"]
18704    pub length: u8,
18705    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18706    pub first_message_offset: u8,
18707    #[doc = "logged data"]
18708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18710    pub data: [u8; 249],
18711}
18712impl LOGGING_DATA_DATA {
18713    pub const ENCODED_LEN: usize = 255usize;
18714    pub const DEFAULT: Self = Self {
18715        sequence: 0_u16,
18716        target_system: 0_u8,
18717        target_component: 0_u8,
18718        length: 0_u8,
18719        first_message_offset: 0_u8,
18720        data: [0_u8; 249usize],
18721    };
18722    #[cfg(feature = "arbitrary")]
18723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18724        use arbitrary::{Arbitrary, Unstructured};
18725        let mut buf = [0u8; 1024];
18726        rng.fill_bytes(&mut buf);
18727        let mut unstructured = Unstructured::new(&buf);
18728        Self::arbitrary(&mut unstructured).unwrap_or_default()
18729    }
18730}
18731impl Default for LOGGING_DATA_DATA {
18732    fn default() -> Self {
18733        Self::DEFAULT.clone()
18734    }
18735}
18736impl MessageData for LOGGING_DATA_DATA {
18737    type Message = MavMessage;
18738    const ID: u32 = 266u32;
18739    const NAME: &'static str = "LOGGING_DATA";
18740    const EXTRA_CRC: u8 = 193u8;
18741    const ENCODED_LEN: usize = 255usize;
18742    fn deser(
18743        _version: MavlinkVersion,
18744        __input: &[u8],
18745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18746        let avail_len = __input.len();
18747        let mut payload_buf = [0; Self::ENCODED_LEN];
18748        let mut buf = if avail_len < Self::ENCODED_LEN {
18749            payload_buf[0..avail_len].copy_from_slice(__input);
18750            Bytes::new(&payload_buf)
18751        } else {
18752            Bytes::new(__input)
18753        };
18754        let mut __struct = Self::default();
18755        __struct.sequence = buf.get_u16_le();
18756        __struct.target_system = buf.get_u8();
18757        __struct.target_component = buf.get_u8();
18758        __struct.length = buf.get_u8();
18759        __struct.first_message_offset = buf.get_u8();
18760        for v in &mut __struct.data {
18761            let val = buf.get_u8();
18762            *v = val;
18763        }
18764        Ok(__struct)
18765    }
18766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18767        let mut __tmp = BytesMut::new(bytes);
18768        #[allow(clippy::absurd_extreme_comparisons)]
18769        #[allow(unused_comparisons)]
18770        if __tmp.remaining() < Self::ENCODED_LEN {
18771            panic!(
18772                "buffer is too small (need {} bytes, but got {})",
18773                Self::ENCODED_LEN,
18774                __tmp.remaining(),
18775            )
18776        }
18777        __tmp.put_u16_le(self.sequence);
18778        __tmp.put_u8(self.target_system);
18779        __tmp.put_u8(self.target_component);
18780        __tmp.put_u8(self.length);
18781        __tmp.put_u8(self.first_message_offset);
18782        for val in &self.data {
18783            __tmp.put_u8(*val);
18784        }
18785        if matches!(version, MavlinkVersion::V2) {
18786            let len = __tmp.len();
18787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18788        } else {
18789            __tmp.len()
18790        }
18791    }
18792}
18793#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18794#[doc = ""]
18795#[doc = "ID: 267"]
18796#[derive(Debug, Clone, PartialEq)]
18797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18799#[cfg_attr(feature = "ts", derive(TS))]
18800#[cfg_attr(feature = "ts", ts(export))]
18801pub struct LOGGING_DATA_ACKED_DATA {
18802    #[doc = "sequence number (can wrap)"]
18803    pub sequence: u16,
18804    #[doc = "system ID of the target"]
18805    pub target_system: u8,
18806    #[doc = "component ID of the target"]
18807    pub target_component: u8,
18808    #[doc = "data length"]
18809    pub length: u8,
18810    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18811    pub first_message_offset: u8,
18812    #[doc = "logged data"]
18813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18814    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18815    pub data: [u8; 249],
18816}
18817impl LOGGING_DATA_ACKED_DATA {
18818    pub const ENCODED_LEN: usize = 255usize;
18819    pub const DEFAULT: Self = Self {
18820        sequence: 0_u16,
18821        target_system: 0_u8,
18822        target_component: 0_u8,
18823        length: 0_u8,
18824        first_message_offset: 0_u8,
18825        data: [0_u8; 249usize],
18826    };
18827    #[cfg(feature = "arbitrary")]
18828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18829        use arbitrary::{Arbitrary, Unstructured};
18830        let mut buf = [0u8; 1024];
18831        rng.fill_bytes(&mut buf);
18832        let mut unstructured = Unstructured::new(&buf);
18833        Self::arbitrary(&mut unstructured).unwrap_or_default()
18834    }
18835}
18836impl Default for LOGGING_DATA_ACKED_DATA {
18837    fn default() -> Self {
18838        Self::DEFAULT.clone()
18839    }
18840}
18841impl MessageData for LOGGING_DATA_ACKED_DATA {
18842    type Message = MavMessage;
18843    const ID: u32 = 267u32;
18844    const NAME: &'static str = "LOGGING_DATA_ACKED";
18845    const EXTRA_CRC: u8 = 35u8;
18846    const ENCODED_LEN: usize = 255usize;
18847    fn deser(
18848        _version: MavlinkVersion,
18849        __input: &[u8],
18850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18851        let avail_len = __input.len();
18852        let mut payload_buf = [0; Self::ENCODED_LEN];
18853        let mut buf = if avail_len < Self::ENCODED_LEN {
18854            payload_buf[0..avail_len].copy_from_slice(__input);
18855            Bytes::new(&payload_buf)
18856        } else {
18857            Bytes::new(__input)
18858        };
18859        let mut __struct = Self::default();
18860        __struct.sequence = buf.get_u16_le();
18861        __struct.target_system = buf.get_u8();
18862        __struct.target_component = buf.get_u8();
18863        __struct.length = buf.get_u8();
18864        __struct.first_message_offset = buf.get_u8();
18865        for v in &mut __struct.data {
18866            let val = buf.get_u8();
18867            *v = val;
18868        }
18869        Ok(__struct)
18870    }
18871    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18872        let mut __tmp = BytesMut::new(bytes);
18873        #[allow(clippy::absurd_extreme_comparisons)]
18874        #[allow(unused_comparisons)]
18875        if __tmp.remaining() < Self::ENCODED_LEN {
18876            panic!(
18877                "buffer is too small (need {} bytes, but got {})",
18878                Self::ENCODED_LEN,
18879                __tmp.remaining(),
18880            )
18881        }
18882        __tmp.put_u16_le(self.sequence);
18883        __tmp.put_u8(self.target_system);
18884        __tmp.put_u8(self.target_component);
18885        __tmp.put_u8(self.length);
18886        __tmp.put_u8(self.first_message_offset);
18887        for val in &self.data {
18888            __tmp.put_u8(*val);
18889        }
18890        if matches!(version, MavlinkVersion::V2) {
18891            let len = __tmp.len();
18892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18893        } else {
18894            __tmp.len()
18895        }
18896    }
18897}
18898#[doc = "Reply to LOG_REQUEST_DATA."]
18899#[doc = ""]
18900#[doc = "ID: 120"]
18901#[derive(Debug, Clone, PartialEq)]
18902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18904#[cfg_attr(feature = "ts", derive(TS))]
18905#[cfg_attr(feature = "ts", ts(export))]
18906pub struct LOG_DATA_DATA {
18907    #[doc = "Offset into the log"]
18908    pub ofs: u32,
18909    #[doc = "Log id (from LOG_ENTRY reply)"]
18910    pub id: u16,
18911    #[doc = "Number of bytes (zero for end of log)"]
18912    pub count: u8,
18913    #[doc = "log data"]
18914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18915    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18916    pub data: [u8; 90],
18917}
18918impl LOG_DATA_DATA {
18919    pub const ENCODED_LEN: usize = 97usize;
18920    pub const DEFAULT: Self = Self {
18921        ofs: 0_u32,
18922        id: 0_u16,
18923        count: 0_u8,
18924        data: [0_u8; 90usize],
18925    };
18926    #[cfg(feature = "arbitrary")]
18927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18928        use arbitrary::{Arbitrary, Unstructured};
18929        let mut buf = [0u8; 1024];
18930        rng.fill_bytes(&mut buf);
18931        let mut unstructured = Unstructured::new(&buf);
18932        Self::arbitrary(&mut unstructured).unwrap_or_default()
18933    }
18934}
18935impl Default for LOG_DATA_DATA {
18936    fn default() -> Self {
18937        Self::DEFAULT.clone()
18938    }
18939}
18940impl MessageData for LOG_DATA_DATA {
18941    type Message = MavMessage;
18942    const ID: u32 = 120u32;
18943    const NAME: &'static str = "LOG_DATA";
18944    const EXTRA_CRC: u8 = 134u8;
18945    const ENCODED_LEN: usize = 97usize;
18946    fn deser(
18947        _version: MavlinkVersion,
18948        __input: &[u8],
18949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18950        let avail_len = __input.len();
18951        let mut payload_buf = [0; Self::ENCODED_LEN];
18952        let mut buf = if avail_len < Self::ENCODED_LEN {
18953            payload_buf[0..avail_len].copy_from_slice(__input);
18954            Bytes::new(&payload_buf)
18955        } else {
18956            Bytes::new(__input)
18957        };
18958        let mut __struct = Self::default();
18959        __struct.ofs = buf.get_u32_le();
18960        __struct.id = buf.get_u16_le();
18961        __struct.count = buf.get_u8();
18962        for v in &mut __struct.data {
18963            let val = buf.get_u8();
18964            *v = val;
18965        }
18966        Ok(__struct)
18967    }
18968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18969        let mut __tmp = BytesMut::new(bytes);
18970        #[allow(clippy::absurd_extreme_comparisons)]
18971        #[allow(unused_comparisons)]
18972        if __tmp.remaining() < Self::ENCODED_LEN {
18973            panic!(
18974                "buffer is too small (need {} bytes, but got {})",
18975                Self::ENCODED_LEN,
18976                __tmp.remaining(),
18977            )
18978        }
18979        __tmp.put_u32_le(self.ofs);
18980        __tmp.put_u16_le(self.id);
18981        __tmp.put_u8(self.count);
18982        for val in &self.data {
18983            __tmp.put_u8(*val);
18984        }
18985        if matches!(version, MavlinkVersion::V2) {
18986            let len = __tmp.len();
18987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18988        } else {
18989            __tmp.len()
18990        }
18991    }
18992}
18993#[doc = "Reply to LOG_REQUEST_LIST."]
18994#[doc = ""]
18995#[doc = "ID: 118"]
18996#[derive(Debug, Clone, PartialEq)]
18997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18999#[cfg_attr(feature = "ts", derive(TS))]
19000#[cfg_attr(feature = "ts", ts(export))]
19001pub struct LOG_ENTRY_DATA {
19002    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19003    pub time_utc: u32,
19004    #[doc = "Size of the log (may be approximate)"]
19005    pub size: u32,
19006    #[doc = "Log id"]
19007    pub id: u16,
19008    #[doc = "Total number of logs"]
19009    pub num_logs: u16,
19010    #[doc = "High log number"]
19011    pub last_log_num: u16,
19012}
19013impl LOG_ENTRY_DATA {
19014    pub const ENCODED_LEN: usize = 14usize;
19015    pub const DEFAULT: Self = Self {
19016        time_utc: 0_u32,
19017        size: 0_u32,
19018        id: 0_u16,
19019        num_logs: 0_u16,
19020        last_log_num: 0_u16,
19021    };
19022    #[cfg(feature = "arbitrary")]
19023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19024        use arbitrary::{Arbitrary, Unstructured};
19025        let mut buf = [0u8; 1024];
19026        rng.fill_bytes(&mut buf);
19027        let mut unstructured = Unstructured::new(&buf);
19028        Self::arbitrary(&mut unstructured).unwrap_or_default()
19029    }
19030}
19031impl Default for LOG_ENTRY_DATA {
19032    fn default() -> Self {
19033        Self::DEFAULT.clone()
19034    }
19035}
19036impl MessageData for LOG_ENTRY_DATA {
19037    type Message = MavMessage;
19038    const ID: u32 = 118u32;
19039    const NAME: &'static str = "LOG_ENTRY";
19040    const EXTRA_CRC: u8 = 56u8;
19041    const ENCODED_LEN: usize = 14usize;
19042    fn deser(
19043        _version: MavlinkVersion,
19044        __input: &[u8],
19045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19046        let avail_len = __input.len();
19047        let mut payload_buf = [0; Self::ENCODED_LEN];
19048        let mut buf = if avail_len < Self::ENCODED_LEN {
19049            payload_buf[0..avail_len].copy_from_slice(__input);
19050            Bytes::new(&payload_buf)
19051        } else {
19052            Bytes::new(__input)
19053        };
19054        let mut __struct = Self::default();
19055        __struct.time_utc = buf.get_u32_le();
19056        __struct.size = buf.get_u32_le();
19057        __struct.id = buf.get_u16_le();
19058        __struct.num_logs = buf.get_u16_le();
19059        __struct.last_log_num = buf.get_u16_le();
19060        Ok(__struct)
19061    }
19062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19063        let mut __tmp = BytesMut::new(bytes);
19064        #[allow(clippy::absurd_extreme_comparisons)]
19065        #[allow(unused_comparisons)]
19066        if __tmp.remaining() < Self::ENCODED_LEN {
19067            panic!(
19068                "buffer is too small (need {} bytes, but got {})",
19069                Self::ENCODED_LEN,
19070                __tmp.remaining(),
19071            )
19072        }
19073        __tmp.put_u32_le(self.time_utc);
19074        __tmp.put_u32_le(self.size);
19075        __tmp.put_u16_le(self.id);
19076        __tmp.put_u16_le(self.num_logs);
19077        __tmp.put_u16_le(self.last_log_num);
19078        if matches!(version, MavlinkVersion::V2) {
19079            let len = __tmp.len();
19080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19081        } else {
19082            __tmp.len()
19083        }
19084    }
19085}
19086#[doc = "Erase all logs."]
19087#[doc = ""]
19088#[doc = "ID: 121"]
19089#[derive(Debug, Clone, PartialEq)]
19090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19092#[cfg_attr(feature = "ts", derive(TS))]
19093#[cfg_attr(feature = "ts", ts(export))]
19094pub struct LOG_ERASE_DATA {
19095    #[doc = "System ID"]
19096    pub target_system: u8,
19097    #[doc = "Component ID"]
19098    pub target_component: u8,
19099}
19100impl LOG_ERASE_DATA {
19101    pub const ENCODED_LEN: usize = 2usize;
19102    pub const DEFAULT: Self = Self {
19103        target_system: 0_u8,
19104        target_component: 0_u8,
19105    };
19106    #[cfg(feature = "arbitrary")]
19107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19108        use arbitrary::{Arbitrary, Unstructured};
19109        let mut buf = [0u8; 1024];
19110        rng.fill_bytes(&mut buf);
19111        let mut unstructured = Unstructured::new(&buf);
19112        Self::arbitrary(&mut unstructured).unwrap_or_default()
19113    }
19114}
19115impl Default for LOG_ERASE_DATA {
19116    fn default() -> Self {
19117        Self::DEFAULT.clone()
19118    }
19119}
19120impl MessageData for LOG_ERASE_DATA {
19121    type Message = MavMessage;
19122    const ID: u32 = 121u32;
19123    const NAME: &'static str = "LOG_ERASE";
19124    const EXTRA_CRC: u8 = 237u8;
19125    const ENCODED_LEN: usize = 2usize;
19126    fn deser(
19127        _version: MavlinkVersion,
19128        __input: &[u8],
19129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19130        let avail_len = __input.len();
19131        let mut payload_buf = [0; Self::ENCODED_LEN];
19132        let mut buf = if avail_len < Self::ENCODED_LEN {
19133            payload_buf[0..avail_len].copy_from_slice(__input);
19134            Bytes::new(&payload_buf)
19135        } else {
19136            Bytes::new(__input)
19137        };
19138        let mut __struct = Self::default();
19139        __struct.target_system = buf.get_u8();
19140        __struct.target_component = buf.get_u8();
19141        Ok(__struct)
19142    }
19143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19144        let mut __tmp = BytesMut::new(bytes);
19145        #[allow(clippy::absurd_extreme_comparisons)]
19146        #[allow(unused_comparisons)]
19147        if __tmp.remaining() < Self::ENCODED_LEN {
19148            panic!(
19149                "buffer is too small (need {} bytes, but got {})",
19150                Self::ENCODED_LEN,
19151                __tmp.remaining(),
19152            )
19153        }
19154        __tmp.put_u8(self.target_system);
19155        __tmp.put_u8(self.target_component);
19156        if matches!(version, MavlinkVersion::V2) {
19157            let len = __tmp.len();
19158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19159        } else {
19160            __tmp.len()
19161        }
19162    }
19163}
19164#[doc = "Request a chunk of a log."]
19165#[doc = ""]
19166#[doc = "ID: 119"]
19167#[derive(Debug, Clone, PartialEq)]
19168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19170#[cfg_attr(feature = "ts", derive(TS))]
19171#[cfg_attr(feature = "ts", ts(export))]
19172pub struct LOG_REQUEST_DATA_DATA {
19173    #[doc = "Offset into the log"]
19174    pub ofs: u32,
19175    #[doc = "Number of bytes"]
19176    pub count: u32,
19177    #[doc = "Log id (from LOG_ENTRY reply)"]
19178    pub id: u16,
19179    #[doc = "System ID"]
19180    pub target_system: u8,
19181    #[doc = "Component ID"]
19182    pub target_component: u8,
19183}
19184impl LOG_REQUEST_DATA_DATA {
19185    pub const ENCODED_LEN: usize = 12usize;
19186    pub const DEFAULT: Self = Self {
19187        ofs: 0_u32,
19188        count: 0_u32,
19189        id: 0_u16,
19190        target_system: 0_u8,
19191        target_component: 0_u8,
19192    };
19193    #[cfg(feature = "arbitrary")]
19194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19195        use arbitrary::{Arbitrary, Unstructured};
19196        let mut buf = [0u8; 1024];
19197        rng.fill_bytes(&mut buf);
19198        let mut unstructured = Unstructured::new(&buf);
19199        Self::arbitrary(&mut unstructured).unwrap_or_default()
19200    }
19201}
19202impl Default for LOG_REQUEST_DATA_DATA {
19203    fn default() -> Self {
19204        Self::DEFAULT.clone()
19205    }
19206}
19207impl MessageData for LOG_REQUEST_DATA_DATA {
19208    type Message = MavMessage;
19209    const ID: u32 = 119u32;
19210    const NAME: &'static str = "LOG_REQUEST_DATA";
19211    const EXTRA_CRC: u8 = 116u8;
19212    const ENCODED_LEN: usize = 12usize;
19213    fn deser(
19214        _version: MavlinkVersion,
19215        __input: &[u8],
19216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19217        let avail_len = __input.len();
19218        let mut payload_buf = [0; Self::ENCODED_LEN];
19219        let mut buf = if avail_len < Self::ENCODED_LEN {
19220            payload_buf[0..avail_len].copy_from_slice(__input);
19221            Bytes::new(&payload_buf)
19222        } else {
19223            Bytes::new(__input)
19224        };
19225        let mut __struct = Self::default();
19226        __struct.ofs = buf.get_u32_le();
19227        __struct.count = buf.get_u32_le();
19228        __struct.id = buf.get_u16_le();
19229        __struct.target_system = buf.get_u8();
19230        __struct.target_component = buf.get_u8();
19231        Ok(__struct)
19232    }
19233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19234        let mut __tmp = BytesMut::new(bytes);
19235        #[allow(clippy::absurd_extreme_comparisons)]
19236        #[allow(unused_comparisons)]
19237        if __tmp.remaining() < Self::ENCODED_LEN {
19238            panic!(
19239                "buffer is too small (need {} bytes, but got {})",
19240                Self::ENCODED_LEN,
19241                __tmp.remaining(),
19242            )
19243        }
19244        __tmp.put_u32_le(self.ofs);
19245        __tmp.put_u32_le(self.count);
19246        __tmp.put_u16_le(self.id);
19247        __tmp.put_u8(self.target_system);
19248        __tmp.put_u8(self.target_component);
19249        if matches!(version, MavlinkVersion::V2) {
19250            let len = __tmp.len();
19251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19252        } else {
19253            __tmp.len()
19254        }
19255    }
19256}
19257#[doc = "Stop log transfer and resume normal logging."]
19258#[doc = ""]
19259#[doc = "ID: 122"]
19260#[derive(Debug, Clone, PartialEq)]
19261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19263#[cfg_attr(feature = "ts", derive(TS))]
19264#[cfg_attr(feature = "ts", ts(export))]
19265pub struct LOG_REQUEST_END_DATA {
19266    #[doc = "System ID"]
19267    pub target_system: u8,
19268    #[doc = "Component ID"]
19269    pub target_component: u8,
19270}
19271impl LOG_REQUEST_END_DATA {
19272    pub const ENCODED_LEN: usize = 2usize;
19273    pub const DEFAULT: Self = Self {
19274        target_system: 0_u8,
19275        target_component: 0_u8,
19276    };
19277    #[cfg(feature = "arbitrary")]
19278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19279        use arbitrary::{Arbitrary, Unstructured};
19280        let mut buf = [0u8; 1024];
19281        rng.fill_bytes(&mut buf);
19282        let mut unstructured = Unstructured::new(&buf);
19283        Self::arbitrary(&mut unstructured).unwrap_or_default()
19284    }
19285}
19286impl Default for LOG_REQUEST_END_DATA {
19287    fn default() -> Self {
19288        Self::DEFAULT.clone()
19289    }
19290}
19291impl MessageData for LOG_REQUEST_END_DATA {
19292    type Message = MavMessage;
19293    const ID: u32 = 122u32;
19294    const NAME: &'static str = "LOG_REQUEST_END";
19295    const EXTRA_CRC: u8 = 203u8;
19296    const ENCODED_LEN: usize = 2usize;
19297    fn deser(
19298        _version: MavlinkVersion,
19299        __input: &[u8],
19300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19301        let avail_len = __input.len();
19302        let mut payload_buf = [0; Self::ENCODED_LEN];
19303        let mut buf = if avail_len < Self::ENCODED_LEN {
19304            payload_buf[0..avail_len].copy_from_slice(__input);
19305            Bytes::new(&payload_buf)
19306        } else {
19307            Bytes::new(__input)
19308        };
19309        let mut __struct = Self::default();
19310        __struct.target_system = buf.get_u8();
19311        __struct.target_component = buf.get_u8();
19312        Ok(__struct)
19313    }
19314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19315        let mut __tmp = BytesMut::new(bytes);
19316        #[allow(clippy::absurd_extreme_comparisons)]
19317        #[allow(unused_comparisons)]
19318        if __tmp.remaining() < Self::ENCODED_LEN {
19319            panic!(
19320                "buffer is too small (need {} bytes, but got {})",
19321                Self::ENCODED_LEN,
19322                __tmp.remaining(),
19323            )
19324        }
19325        __tmp.put_u8(self.target_system);
19326        __tmp.put_u8(self.target_component);
19327        if matches!(version, MavlinkVersion::V2) {
19328            let len = __tmp.len();
19329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19330        } else {
19331            __tmp.len()
19332        }
19333    }
19334}
19335#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19336#[doc = ""]
19337#[doc = "ID: 117"]
19338#[derive(Debug, Clone, PartialEq)]
19339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19341#[cfg_attr(feature = "ts", derive(TS))]
19342#[cfg_attr(feature = "ts", ts(export))]
19343pub struct LOG_REQUEST_LIST_DATA {
19344    #[doc = "First log id (0 for first available)"]
19345    pub start: u16,
19346    #[doc = "Last log id (0xffff for last available)"]
19347    pub end: u16,
19348    #[doc = "System ID"]
19349    pub target_system: u8,
19350    #[doc = "Component ID"]
19351    pub target_component: u8,
19352}
19353impl LOG_REQUEST_LIST_DATA {
19354    pub const ENCODED_LEN: usize = 6usize;
19355    pub const DEFAULT: Self = Self {
19356        start: 0_u16,
19357        end: 0_u16,
19358        target_system: 0_u8,
19359        target_component: 0_u8,
19360    };
19361    #[cfg(feature = "arbitrary")]
19362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19363        use arbitrary::{Arbitrary, Unstructured};
19364        let mut buf = [0u8; 1024];
19365        rng.fill_bytes(&mut buf);
19366        let mut unstructured = Unstructured::new(&buf);
19367        Self::arbitrary(&mut unstructured).unwrap_or_default()
19368    }
19369}
19370impl Default for LOG_REQUEST_LIST_DATA {
19371    fn default() -> Self {
19372        Self::DEFAULT.clone()
19373    }
19374}
19375impl MessageData for LOG_REQUEST_LIST_DATA {
19376    type Message = MavMessage;
19377    const ID: u32 = 117u32;
19378    const NAME: &'static str = "LOG_REQUEST_LIST";
19379    const EXTRA_CRC: u8 = 128u8;
19380    const ENCODED_LEN: usize = 6usize;
19381    fn deser(
19382        _version: MavlinkVersion,
19383        __input: &[u8],
19384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19385        let avail_len = __input.len();
19386        let mut payload_buf = [0; Self::ENCODED_LEN];
19387        let mut buf = if avail_len < Self::ENCODED_LEN {
19388            payload_buf[0..avail_len].copy_from_slice(__input);
19389            Bytes::new(&payload_buf)
19390        } else {
19391            Bytes::new(__input)
19392        };
19393        let mut __struct = Self::default();
19394        __struct.start = buf.get_u16_le();
19395        __struct.end = buf.get_u16_le();
19396        __struct.target_system = buf.get_u8();
19397        __struct.target_component = buf.get_u8();
19398        Ok(__struct)
19399    }
19400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19401        let mut __tmp = BytesMut::new(bytes);
19402        #[allow(clippy::absurd_extreme_comparisons)]
19403        #[allow(unused_comparisons)]
19404        if __tmp.remaining() < Self::ENCODED_LEN {
19405            panic!(
19406                "buffer is too small (need {} bytes, but got {})",
19407                Self::ENCODED_LEN,
19408                __tmp.remaining(),
19409            )
19410        }
19411        __tmp.put_u16_le(self.start);
19412        __tmp.put_u16_le(self.end);
19413        __tmp.put_u8(self.target_system);
19414        __tmp.put_u8(self.target_component);
19415        if matches!(version, MavlinkVersion::V2) {
19416            let len = __tmp.len();
19417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19418        } else {
19419            __tmp.len()
19420        }
19421    }
19422}
19423#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19424#[doc = ""]
19425#[doc = "ID: 192"]
19426#[derive(Debug, Clone, PartialEq)]
19427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19429#[cfg_attr(feature = "ts", derive(TS))]
19430#[cfg_attr(feature = "ts", ts(export))]
19431pub struct MAG_CAL_REPORT_DATA {
19432    #[doc = "RMS milligauss residuals."]
19433    pub fitness: f32,
19434    #[doc = "X offset."]
19435    pub ofs_x: f32,
19436    #[doc = "Y offset."]
19437    pub ofs_y: f32,
19438    #[doc = "Z offset."]
19439    pub ofs_z: f32,
19440    #[doc = "X diagonal (matrix 11)."]
19441    pub diag_x: f32,
19442    #[doc = "Y diagonal (matrix 22)."]
19443    pub diag_y: f32,
19444    #[doc = "Z diagonal (matrix 33)."]
19445    pub diag_z: f32,
19446    #[doc = "X off-diagonal (matrix 12 and 21)."]
19447    pub offdiag_x: f32,
19448    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19449    pub offdiag_y: f32,
19450    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19451    pub offdiag_z: f32,
19452    #[doc = "Compass being calibrated."]
19453    pub compass_id: u8,
19454    #[doc = "Bitmask of compasses being calibrated."]
19455    pub cal_mask: u8,
19456    #[doc = "Calibration Status."]
19457    pub cal_status: MagCalStatus,
19458    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19459    pub autosaved: u8,
19460    #[doc = "Confidence in orientation (higher is better)."]
19461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19462    pub orientation_confidence: f32,
19463    #[doc = "orientation before calibration."]
19464    #[cfg_attr(feature = "serde", serde(default))]
19465    pub old_orientation: MavSensorOrientation,
19466    #[doc = "orientation after calibration."]
19467    #[cfg_attr(feature = "serde", serde(default))]
19468    pub new_orientation: MavSensorOrientation,
19469    #[doc = "field radius correction factor"]
19470    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19471    pub scale_factor: f32,
19472}
19473impl MAG_CAL_REPORT_DATA {
19474    pub const ENCODED_LEN: usize = 54usize;
19475    pub const DEFAULT: Self = Self {
19476        fitness: 0.0_f32,
19477        ofs_x: 0.0_f32,
19478        ofs_y: 0.0_f32,
19479        ofs_z: 0.0_f32,
19480        diag_x: 0.0_f32,
19481        diag_y: 0.0_f32,
19482        diag_z: 0.0_f32,
19483        offdiag_x: 0.0_f32,
19484        offdiag_y: 0.0_f32,
19485        offdiag_z: 0.0_f32,
19486        compass_id: 0_u8,
19487        cal_mask: 0_u8,
19488        cal_status: MagCalStatus::DEFAULT,
19489        autosaved: 0_u8,
19490        orientation_confidence: 0.0_f32,
19491        old_orientation: MavSensorOrientation::DEFAULT,
19492        new_orientation: MavSensorOrientation::DEFAULT,
19493        scale_factor: 0.0_f32,
19494    };
19495    #[cfg(feature = "arbitrary")]
19496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19497        use arbitrary::{Arbitrary, Unstructured};
19498        let mut buf = [0u8; 1024];
19499        rng.fill_bytes(&mut buf);
19500        let mut unstructured = Unstructured::new(&buf);
19501        Self::arbitrary(&mut unstructured).unwrap_or_default()
19502    }
19503}
19504impl Default for MAG_CAL_REPORT_DATA {
19505    fn default() -> Self {
19506        Self::DEFAULT.clone()
19507    }
19508}
19509impl MessageData for MAG_CAL_REPORT_DATA {
19510    type Message = MavMessage;
19511    const ID: u32 = 192u32;
19512    const NAME: &'static str = "MAG_CAL_REPORT";
19513    const EXTRA_CRC: u8 = 36u8;
19514    const ENCODED_LEN: usize = 54usize;
19515    fn deser(
19516        _version: MavlinkVersion,
19517        __input: &[u8],
19518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19519        let avail_len = __input.len();
19520        let mut payload_buf = [0; Self::ENCODED_LEN];
19521        let mut buf = if avail_len < Self::ENCODED_LEN {
19522            payload_buf[0..avail_len].copy_from_slice(__input);
19523            Bytes::new(&payload_buf)
19524        } else {
19525            Bytes::new(__input)
19526        };
19527        let mut __struct = Self::default();
19528        __struct.fitness = buf.get_f32_le();
19529        __struct.ofs_x = buf.get_f32_le();
19530        __struct.ofs_y = buf.get_f32_le();
19531        __struct.ofs_z = buf.get_f32_le();
19532        __struct.diag_x = buf.get_f32_le();
19533        __struct.diag_y = buf.get_f32_le();
19534        __struct.diag_z = buf.get_f32_le();
19535        __struct.offdiag_x = buf.get_f32_le();
19536        __struct.offdiag_y = buf.get_f32_le();
19537        __struct.offdiag_z = buf.get_f32_le();
19538        __struct.compass_id = buf.get_u8();
19539        __struct.cal_mask = buf.get_u8();
19540        let tmp = buf.get_u8();
19541        __struct.cal_status =
19542            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19543                enum_type: "MagCalStatus",
19544                value: tmp as u64,
19545            })?;
19546        __struct.autosaved = buf.get_u8();
19547        __struct.orientation_confidence = buf.get_f32_le();
19548        let tmp = buf.get_u8();
19549        __struct.old_orientation =
19550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19551                enum_type: "MavSensorOrientation",
19552                value: tmp as u64,
19553            })?;
19554        let tmp = buf.get_u8();
19555        __struct.new_orientation =
19556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19557                enum_type: "MavSensorOrientation",
19558                value: tmp as u64,
19559            })?;
19560        __struct.scale_factor = buf.get_f32_le();
19561        Ok(__struct)
19562    }
19563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19564        let mut __tmp = BytesMut::new(bytes);
19565        #[allow(clippy::absurd_extreme_comparisons)]
19566        #[allow(unused_comparisons)]
19567        if __tmp.remaining() < Self::ENCODED_LEN {
19568            panic!(
19569                "buffer is too small (need {} bytes, but got {})",
19570                Self::ENCODED_LEN,
19571                __tmp.remaining(),
19572            )
19573        }
19574        __tmp.put_f32_le(self.fitness);
19575        __tmp.put_f32_le(self.ofs_x);
19576        __tmp.put_f32_le(self.ofs_y);
19577        __tmp.put_f32_le(self.ofs_z);
19578        __tmp.put_f32_le(self.diag_x);
19579        __tmp.put_f32_le(self.diag_y);
19580        __tmp.put_f32_le(self.diag_z);
19581        __tmp.put_f32_le(self.offdiag_x);
19582        __tmp.put_f32_le(self.offdiag_y);
19583        __tmp.put_f32_le(self.offdiag_z);
19584        __tmp.put_u8(self.compass_id);
19585        __tmp.put_u8(self.cal_mask);
19586        __tmp.put_u8(self.cal_status as u8);
19587        __tmp.put_u8(self.autosaved);
19588        if matches!(version, MavlinkVersion::V2) {
19589            __tmp.put_f32_le(self.orientation_confidence);
19590            __tmp.put_u8(self.old_orientation as u8);
19591            __tmp.put_u8(self.new_orientation as u8);
19592            __tmp.put_f32_le(self.scale_factor);
19593            let len = __tmp.len();
19594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19595        } else {
19596            __tmp.len()
19597        }
19598    }
19599}
19600#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19601#[doc = ""]
19602#[doc = "ID: 69"]
19603#[derive(Debug, Clone, PartialEq)]
19604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19606#[cfg_attr(feature = "ts", derive(TS))]
19607#[cfg_attr(feature = "ts", ts(export))]
19608pub struct MANUAL_CONTROL_DATA {
19609    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19610    pub x: i16,
19611    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19612    pub y: i16,
19613    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19614    pub z: i16,
19615    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19616    pub r: i16,
19617    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19618    pub buttons: u16,
19619    #[doc = "The system to be controlled."]
19620    pub target: u8,
19621    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19623    pub buttons2: u16,
19624    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19626    pub enabled_extensions: u8,
19627    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19629    pub s: i16,
19630    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19632    pub t: i16,
19633    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19635    pub aux1: i16,
19636    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19638    pub aux2: i16,
19639    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19641    pub aux3: i16,
19642    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19644    pub aux4: i16,
19645    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19647    pub aux5: i16,
19648    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19650    pub aux6: i16,
19651}
19652impl MANUAL_CONTROL_DATA {
19653    pub const ENCODED_LEN: usize = 30usize;
19654    pub const DEFAULT: Self = Self {
19655        x: 0_i16,
19656        y: 0_i16,
19657        z: 0_i16,
19658        r: 0_i16,
19659        buttons: 0_u16,
19660        target: 0_u8,
19661        buttons2: 0_u16,
19662        enabled_extensions: 0_u8,
19663        s: 0_i16,
19664        t: 0_i16,
19665        aux1: 0_i16,
19666        aux2: 0_i16,
19667        aux3: 0_i16,
19668        aux4: 0_i16,
19669        aux5: 0_i16,
19670        aux6: 0_i16,
19671    };
19672    #[cfg(feature = "arbitrary")]
19673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19674        use arbitrary::{Arbitrary, Unstructured};
19675        let mut buf = [0u8; 1024];
19676        rng.fill_bytes(&mut buf);
19677        let mut unstructured = Unstructured::new(&buf);
19678        Self::arbitrary(&mut unstructured).unwrap_or_default()
19679    }
19680}
19681impl Default for MANUAL_CONTROL_DATA {
19682    fn default() -> Self {
19683        Self::DEFAULT.clone()
19684    }
19685}
19686impl MessageData for MANUAL_CONTROL_DATA {
19687    type Message = MavMessage;
19688    const ID: u32 = 69u32;
19689    const NAME: &'static str = "MANUAL_CONTROL";
19690    const EXTRA_CRC: u8 = 243u8;
19691    const ENCODED_LEN: usize = 30usize;
19692    fn deser(
19693        _version: MavlinkVersion,
19694        __input: &[u8],
19695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19696        let avail_len = __input.len();
19697        let mut payload_buf = [0; Self::ENCODED_LEN];
19698        let mut buf = if avail_len < Self::ENCODED_LEN {
19699            payload_buf[0..avail_len].copy_from_slice(__input);
19700            Bytes::new(&payload_buf)
19701        } else {
19702            Bytes::new(__input)
19703        };
19704        let mut __struct = Self::default();
19705        __struct.x = buf.get_i16_le();
19706        __struct.y = buf.get_i16_le();
19707        __struct.z = buf.get_i16_le();
19708        __struct.r = buf.get_i16_le();
19709        __struct.buttons = buf.get_u16_le();
19710        __struct.target = buf.get_u8();
19711        __struct.buttons2 = buf.get_u16_le();
19712        __struct.enabled_extensions = buf.get_u8();
19713        __struct.s = buf.get_i16_le();
19714        __struct.t = buf.get_i16_le();
19715        __struct.aux1 = buf.get_i16_le();
19716        __struct.aux2 = buf.get_i16_le();
19717        __struct.aux3 = buf.get_i16_le();
19718        __struct.aux4 = buf.get_i16_le();
19719        __struct.aux5 = buf.get_i16_le();
19720        __struct.aux6 = buf.get_i16_le();
19721        Ok(__struct)
19722    }
19723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19724        let mut __tmp = BytesMut::new(bytes);
19725        #[allow(clippy::absurd_extreme_comparisons)]
19726        #[allow(unused_comparisons)]
19727        if __tmp.remaining() < Self::ENCODED_LEN {
19728            panic!(
19729                "buffer is too small (need {} bytes, but got {})",
19730                Self::ENCODED_LEN,
19731                __tmp.remaining(),
19732            )
19733        }
19734        __tmp.put_i16_le(self.x);
19735        __tmp.put_i16_le(self.y);
19736        __tmp.put_i16_le(self.z);
19737        __tmp.put_i16_le(self.r);
19738        __tmp.put_u16_le(self.buttons);
19739        __tmp.put_u8(self.target);
19740        if matches!(version, MavlinkVersion::V2) {
19741            __tmp.put_u16_le(self.buttons2);
19742            __tmp.put_u8(self.enabled_extensions);
19743            __tmp.put_i16_le(self.s);
19744            __tmp.put_i16_le(self.t);
19745            __tmp.put_i16_le(self.aux1);
19746            __tmp.put_i16_le(self.aux2);
19747            __tmp.put_i16_le(self.aux3);
19748            __tmp.put_i16_le(self.aux4);
19749            __tmp.put_i16_le(self.aux5);
19750            __tmp.put_i16_le(self.aux6);
19751            let len = __tmp.len();
19752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19753        } else {
19754            __tmp.len()
19755        }
19756    }
19757}
19758#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19759#[doc = ""]
19760#[doc = "ID: 81"]
19761#[derive(Debug, Clone, PartialEq)]
19762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19764#[cfg_attr(feature = "ts", derive(TS))]
19765#[cfg_attr(feature = "ts", ts(export))]
19766pub struct MANUAL_SETPOINT_DATA {
19767    #[doc = "Timestamp (time since system boot)."]
19768    pub time_boot_ms: u32,
19769    #[doc = "Desired roll rate"]
19770    pub roll: f32,
19771    #[doc = "Desired pitch rate"]
19772    pub pitch: f32,
19773    #[doc = "Desired yaw rate"]
19774    pub yaw: f32,
19775    #[doc = "Collective thrust, normalized to 0 .. 1"]
19776    pub thrust: f32,
19777    #[doc = "Flight mode switch position, 0.. 255"]
19778    pub mode_switch: u8,
19779    #[doc = "Override mode switch position, 0.. 255"]
19780    pub manual_override_switch: u8,
19781}
19782impl MANUAL_SETPOINT_DATA {
19783    pub const ENCODED_LEN: usize = 22usize;
19784    pub const DEFAULT: Self = Self {
19785        time_boot_ms: 0_u32,
19786        roll: 0.0_f32,
19787        pitch: 0.0_f32,
19788        yaw: 0.0_f32,
19789        thrust: 0.0_f32,
19790        mode_switch: 0_u8,
19791        manual_override_switch: 0_u8,
19792    };
19793    #[cfg(feature = "arbitrary")]
19794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19795        use arbitrary::{Arbitrary, Unstructured};
19796        let mut buf = [0u8; 1024];
19797        rng.fill_bytes(&mut buf);
19798        let mut unstructured = Unstructured::new(&buf);
19799        Self::arbitrary(&mut unstructured).unwrap_or_default()
19800    }
19801}
19802impl Default for MANUAL_SETPOINT_DATA {
19803    fn default() -> Self {
19804        Self::DEFAULT.clone()
19805    }
19806}
19807impl MessageData for MANUAL_SETPOINT_DATA {
19808    type Message = MavMessage;
19809    const ID: u32 = 81u32;
19810    const NAME: &'static str = "MANUAL_SETPOINT";
19811    const EXTRA_CRC: u8 = 106u8;
19812    const ENCODED_LEN: usize = 22usize;
19813    fn deser(
19814        _version: MavlinkVersion,
19815        __input: &[u8],
19816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19817        let avail_len = __input.len();
19818        let mut payload_buf = [0; Self::ENCODED_LEN];
19819        let mut buf = if avail_len < Self::ENCODED_LEN {
19820            payload_buf[0..avail_len].copy_from_slice(__input);
19821            Bytes::new(&payload_buf)
19822        } else {
19823            Bytes::new(__input)
19824        };
19825        let mut __struct = Self::default();
19826        __struct.time_boot_ms = buf.get_u32_le();
19827        __struct.roll = buf.get_f32_le();
19828        __struct.pitch = buf.get_f32_le();
19829        __struct.yaw = buf.get_f32_le();
19830        __struct.thrust = buf.get_f32_le();
19831        __struct.mode_switch = buf.get_u8();
19832        __struct.manual_override_switch = buf.get_u8();
19833        Ok(__struct)
19834    }
19835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19836        let mut __tmp = BytesMut::new(bytes);
19837        #[allow(clippy::absurd_extreme_comparisons)]
19838        #[allow(unused_comparisons)]
19839        if __tmp.remaining() < Self::ENCODED_LEN {
19840            panic!(
19841                "buffer is too small (need {} bytes, but got {})",
19842                Self::ENCODED_LEN,
19843                __tmp.remaining(),
19844            )
19845        }
19846        __tmp.put_u32_le(self.time_boot_ms);
19847        __tmp.put_f32_le(self.roll);
19848        __tmp.put_f32_le(self.pitch);
19849        __tmp.put_f32_le(self.yaw);
19850        __tmp.put_f32_le(self.thrust);
19851        __tmp.put_u8(self.mode_switch);
19852        __tmp.put_u8(self.manual_override_switch);
19853        if matches!(version, MavlinkVersion::V2) {
19854            let len = __tmp.len();
19855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19856        } else {
19857            __tmp.len()
19858        }
19859    }
19860}
19861#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19862#[doc = ""]
19863#[doc = "ID: 249"]
19864#[derive(Debug, Clone, PartialEq)]
19865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19867#[cfg_attr(feature = "ts", derive(TS))]
19868#[cfg_attr(feature = "ts", ts(export))]
19869pub struct MEMORY_VECT_DATA {
19870    #[doc = "Starting address of the debug variables"]
19871    pub address: u16,
19872    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19873    pub ver: u8,
19874    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19875    pub mavtype: u8,
19876    #[doc = "Memory contents at specified address"]
19877    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19878    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19879    pub value: [i8; 32],
19880}
19881impl MEMORY_VECT_DATA {
19882    pub const ENCODED_LEN: usize = 36usize;
19883    pub const DEFAULT: Self = Self {
19884        address: 0_u16,
19885        ver: 0_u8,
19886        mavtype: 0_u8,
19887        value: [0_i8; 32usize],
19888    };
19889    #[cfg(feature = "arbitrary")]
19890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19891        use arbitrary::{Arbitrary, Unstructured};
19892        let mut buf = [0u8; 1024];
19893        rng.fill_bytes(&mut buf);
19894        let mut unstructured = Unstructured::new(&buf);
19895        Self::arbitrary(&mut unstructured).unwrap_or_default()
19896    }
19897}
19898impl Default for MEMORY_VECT_DATA {
19899    fn default() -> Self {
19900        Self::DEFAULT.clone()
19901    }
19902}
19903impl MessageData for MEMORY_VECT_DATA {
19904    type Message = MavMessage;
19905    const ID: u32 = 249u32;
19906    const NAME: &'static str = "MEMORY_VECT";
19907    const EXTRA_CRC: u8 = 204u8;
19908    const ENCODED_LEN: usize = 36usize;
19909    fn deser(
19910        _version: MavlinkVersion,
19911        __input: &[u8],
19912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19913        let avail_len = __input.len();
19914        let mut payload_buf = [0; Self::ENCODED_LEN];
19915        let mut buf = if avail_len < Self::ENCODED_LEN {
19916            payload_buf[0..avail_len].copy_from_slice(__input);
19917            Bytes::new(&payload_buf)
19918        } else {
19919            Bytes::new(__input)
19920        };
19921        let mut __struct = Self::default();
19922        __struct.address = buf.get_u16_le();
19923        __struct.ver = buf.get_u8();
19924        __struct.mavtype = buf.get_u8();
19925        for v in &mut __struct.value {
19926            let val = buf.get_i8();
19927            *v = val;
19928        }
19929        Ok(__struct)
19930    }
19931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19932        let mut __tmp = BytesMut::new(bytes);
19933        #[allow(clippy::absurd_extreme_comparisons)]
19934        #[allow(unused_comparisons)]
19935        if __tmp.remaining() < Self::ENCODED_LEN {
19936            panic!(
19937                "buffer is too small (need {} bytes, but got {})",
19938                Self::ENCODED_LEN,
19939                __tmp.remaining(),
19940            )
19941        }
19942        __tmp.put_u16_le(self.address);
19943        __tmp.put_u8(self.ver);
19944        __tmp.put_u8(self.mavtype);
19945        for val in &self.value {
19946            __tmp.put_i8(*val);
19947        }
19948        if matches!(version, MavlinkVersion::V2) {
19949            let len = __tmp.len();
19950            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19951        } else {
19952            __tmp.len()
19953        }
19954    }
19955}
19956#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19957#[doc = ""]
19958#[doc = "ID: 244"]
19959#[derive(Debug, Clone, PartialEq)]
19960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19961#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19962#[cfg_attr(feature = "ts", derive(TS))]
19963#[cfg_attr(feature = "ts", ts(export))]
19964pub struct MESSAGE_INTERVAL_DATA {
19965    #[doc = "0 indicates the interval at which it is sent."]
19966    pub interval_us: i32,
19967    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19968    pub message_id: u16,
19969}
19970impl MESSAGE_INTERVAL_DATA {
19971    pub const ENCODED_LEN: usize = 6usize;
19972    pub const DEFAULT: Self = Self {
19973        interval_us: 0_i32,
19974        message_id: 0_u16,
19975    };
19976    #[cfg(feature = "arbitrary")]
19977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19978        use arbitrary::{Arbitrary, Unstructured};
19979        let mut buf = [0u8; 1024];
19980        rng.fill_bytes(&mut buf);
19981        let mut unstructured = Unstructured::new(&buf);
19982        Self::arbitrary(&mut unstructured).unwrap_or_default()
19983    }
19984}
19985impl Default for MESSAGE_INTERVAL_DATA {
19986    fn default() -> Self {
19987        Self::DEFAULT.clone()
19988    }
19989}
19990impl MessageData for MESSAGE_INTERVAL_DATA {
19991    type Message = MavMessage;
19992    const ID: u32 = 244u32;
19993    const NAME: &'static str = "MESSAGE_INTERVAL";
19994    const EXTRA_CRC: u8 = 95u8;
19995    const ENCODED_LEN: usize = 6usize;
19996    fn deser(
19997        _version: MavlinkVersion,
19998        __input: &[u8],
19999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20000        let avail_len = __input.len();
20001        let mut payload_buf = [0; Self::ENCODED_LEN];
20002        let mut buf = if avail_len < Self::ENCODED_LEN {
20003            payload_buf[0..avail_len].copy_from_slice(__input);
20004            Bytes::new(&payload_buf)
20005        } else {
20006            Bytes::new(__input)
20007        };
20008        let mut __struct = Self::default();
20009        __struct.interval_us = buf.get_i32_le();
20010        __struct.message_id = buf.get_u16_le();
20011        Ok(__struct)
20012    }
20013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20014        let mut __tmp = BytesMut::new(bytes);
20015        #[allow(clippy::absurd_extreme_comparisons)]
20016        #[allow(unused_comparisons)]
20017        if __tmp.remaining() < Self::ENCODED_LEN {
20018            panic!(
20019                "buffer is too small (need {} bytes, but got {})",
20020                Self::ENCODED_LEN,
20021                __tmp.remaining(),
20022            )
20023        }
20024        __tmp.put_i32_le(self.interval_us);
20025        __tmp.put_u16_le(self.message_id);
20026        if matches!(version, MavlinkVersion::V2) {
20027            let len = __tmp.len();
20028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20029        } else {
20030            __tmp.len()
20031        }
20032    }
20033}
20034#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20035#[doc = ""]
20036#[doc = "ID: 47"]
20037#[derive(Debug, Clone, PartialEq)]
20038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20040#[cfg_attr(feature = "ts", derive(TS))]
20041#[cfg_attr(feature = "ts", ts(export))]
20042pub struct MISSION_ACK_DATA {
20043    #[doc = "System ID"]
20044    pub target_system: u8,
20045    #[doc = "Component ID"]
20046    pub target_component: u8,
20047    #[doc = "Mission result."]
20048    pub mavtype: MavMissionResult,
20049    #[doc = "Mission type."]
20050    #[cfg_attr(feature = "serde", serde(default))]
20051    pub mission_type: MavMissionType,
20052    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20054    pub opaque_id: u32,
20055}
20056impl MISSION_ACK_DATA {
20057    pub const ENCODED_LEN: usize = 8usize;
20058    pub const DEFAULT: Self = Self {
20059        target_system: 0_u8,
20060        target_component: 0_u8,
20061        mavtype: MavMissionResult::DEFAULT,
20062        mission_type: MavMissionType::DEFAULT,
20063        opaque_id: 0_u32,
20064    };
20065    #[cfg(feature = "arbitrary")]
20066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20067        use arbitrary::{Arbitrary, Unstructured};
20068        let mut buf = [0u8; 1024];
20069        rng.fill_bytes(&mut buf);
20070        let mut unstructured = Unstructured::new(&buf);
20071        Self::arbitrary(&mut unstructured).unwrap_or_default()
20072    }
20073}
20074impl Default for MISSION_ACK_DATA {
20075    fn default() -> Self {
20076        Self::DEFAULT.clone()
20077    }
20078}
20079impl MessageData for MISSION_ACK_DATA {
20080    type Message = MavMessage;
20081    const ID: u32 = 47u32;
20082    const NAME: &'static str = "MISSION_ACK";
20083    const EXTRA_CRC: u8 = 153u8;
20084    const ENCODED_LEN: usize = 8usize;
20085    fn deser(
20086        _version: MavlinkVersion,
20087        __input: &[u8],
20088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20089        let avail_len = __input.len();
20090        let mut payload_buf = [0; Self::ENCODED_LEN];
20091        let mut buf = if avail_len < Self::ENCODED_LEN {
20092            payload_buf[0..avail_len].copy_from_slice(__input);
20093            Bytes::new(&payload_buf)
20094        } else {
20095            Bytes::new(__input)
20096        };
20097        let mut __struct = Self::default();
20098        __struct.target_system = buf.get_u8();
20099        __struct.target_component = buf.get_u8();
20100        let tmp = buf.get_u8();
20101        __struct.mavtype =
20102            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20103                enum_type: "MavMissionResult",
20104                value: tmp as u64,
20105            })?;
20106        let tmp = buf.get_u8();
20107        __struct.mission_type =
20108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20109                enum_type: "MavMissionType",
20110                value: tmp as u64,
20111            })?;
20112        __struct.opaque_id = buf.get_u32_le();
20113        Ok(__struct)
20114    }
20115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20116        let mut __tmp = BytesMut::new(bytes);
20117        #[allow(clippy::absurd_extreme_comparisons)]
20118        #[allow(unused_comparisons)]
20119        if __tmp.remaining() < Self::ENCODED_LEN {
20120            panic!(
20121                "buffer is too small (need {} bytes, but got {})",
20122                Self::ENCODED_LEN,
20123                __tmp.remaining(),
20124            )
20125        }
20126        __tmp.put_u8(self.target_system);
20127        __tmp.put_u8(self.target_component);
20128        __tmp.put_u8(self.mavtype as u8);
20129        if matches!(version, MavlinkVersion::V2) {
20130            __tmp.put_u8(self.mission_type as u8);
20131            __tmp.put_u32_le(self.opaque_id);
20132            let len = __tmp.len();
20133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20134        } else {
20135            __tmp.len()
20136        }
20137    }
20138}
20139#[doc = "Delete all mission items at once."]
20140#[doc = ""]
20141#[doc = "ID: 45"]
20142#[derive(Debug, Clone, PartialEq)]
20143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20145#[cfg_attr(feature = "ts", derive(TS))]
20146#[cfg_attr(feature = "ts", ts(export))]
20147pub struct MISSION_CLEAR_ALL_DATA {
20148    #[doc = "System ID"]
20149    pub target_system: u8,
20150    #[doc = "Component ID"]
20151    pub target_component: u8,
20152    #[doc = "Mission type."]
20153    #[cfg_attr(feature = "serde", serde(default))]
20154    pub mission_type: MavMissionType,
20155}
20156impl MISSION_CLEAR_ALL_DATA {
20157    pub const ENCODED_LEN: usize = 3usize;
20158    pub const DEFAULT: Self = Self {
20159        target_system: 0_u8,
20160        target_component: 0_u8,
20161        mission_type: MavMissionType::DEFAULT,
20162    };
20163    #[cfg(feature = "arbitrary")]
20164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20165        use arbitrary::{Arbitrary, Unstructured};
20166        let mut buf = [0u8; 1024];
20167        rng.fill_bytes(&mut buf);
20168        let mut unstructured = Unstructured::new(&buf);
20169        Self::arbitrary(&mut unstructured).unwrap_or_default()
20170    }
20171}
20172impl Default for MISSION_CLEAR_ALL_DATA {
20173    fn default() -> Self {
20174        Self::DEFAULT.clone()
20175    }
20176}
20177impl MessageData for MISSION_CLEAR_ALL_DATA {
20178    type Message = MavMessage;
20179    const ID: u32 = 45u32;
20180    const NAME: &'static str = "MISSION_CLEAR_ALL";
20181    const EXTRA_CRC: u8 = 232u8;
20182    const ENCODED_LEN: usize = 3usize;
20183    fn deser(
20184        _version: MavlinkVersion,
20185        __input: &[u8],
20186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20187        let avail_len = __input.len();
20188        let mut payload_buf = [0; Self::ENCODED_LEN];
20189        let mut buf = if avail_len < Self::ENCODED_LEN {
20190            payload_buf[0..avail_len].copy_from_slice(__input);
20191            Bytes::new(&payload_buf)
20192        } else {
20193            Bytes::new(__input)
20194        };
20195        let mut __struct = Self::default();
20196        __struct.target_system = buf.get_u8();
20197        __struct.target_component = buf.get_u8();
20198        let tmp = buf.get_u8();
20199        __struct.mission_type =
20200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20201                enum_type: "MavMissionType",
20202                value: tmp as u64,
20203            })?;
20204        Ok(__struct)
20205    }
20206    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20207        let mut __tmp = BytesMut::new(bytes);
20208        #[allow(clippy::absurd_extreme_comparisons)]
20209        #[allow(unused_comparisons)]
20210        if __tmp.remaining() < Self::ENCODED_LEN {
20211            panic!(
20212                "buffer is too small (need {} bytes, but got {})",
20213                Self::ENCODED_LEN,
20214                __tmp.remaining(),
20215            )
20216        }
20217        __tmp.put_u8(self.target_system);
20218        __tmp.put_u8(self.target_component);
20219        if matches!(version, MavlinkVersion::V2) {
20220            __tmp.put_u8(self.mission_type as u8);
20221            let len = __tmp.len();
20222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20223        } else {
20224            __tmp.len()
20225        }
20226    }
20227}
20228#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20229#[doc = ""]
20230#[doc = "ID: 44"]
20231#[derive(Debug, Clone, PartialEq)]
20232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20234#[cfg_attr(feature = "ts", derive(TS))]
20235#[cfg_attr(feature = "ts", ts(export))]
20236pub struct MISSION_COUNT_DATA {
20237    #[doc = "Number of mission items in the sequence"]
20238    pub count: u16,
20239    #[doc = "System ID"]
20240    pub target_system: u8,
20241    #[doc = "Component ID"]
20242    pub target_component: u8,
20243    #[doc = "Mission type."]
20244    #[cfg_attr(feature = "serde", serde(default))]
20245    pub mission_type: MavMissionType,
20246    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20248    pub opaque_id: u32,
20249}
20250impl MISSION_COUNT_DATA {
20251    pub const ENCODED_LEN: usize = 9usize;
20252    pub const DEFAULT: Self = Self {
20253        count: 0_u16,
20254        target_system: 0_u8,
20255        target_component: 0_u8,
20256        mission_type: MavMissionType::DEFAULT,
20257        opaque_id: 0_u32,
20258    };
20259    #[cfg(feature = "arbitrary")]
20260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20261        use arbitrary::{Arbitrary, Unstructured};
20262        let mut buf = [0u8; 1024];
20263        rng.fill_bytes(&mut buf);
20264        let mut unstructured = Unstructured::new(&buf);
20265        Self::arbitrary(&mut unstructured).unwrap_or_default()
20266    }
20267}
20268impl Default for MISSION_COUNT_DATA {
20269    fn default() -> Self {
20270        Self::DEFAULT.clone()
20271    }
20272}
20273impl MessageData for MISSION_COUNT_DATA {
20274    type Message = MavMessage;
20275    const ID: u32 = 44u32;
20276    const NAME: &'static str = "MISSION_COUNT";
20277    const EXTRA_CRC: u8 = 221u8;
20278    const ENCODED_LEN: usize = 9usize;
20279    fn deser(
20280        _version: MavlinkVersion,
20281        __input: &[u8],
20282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20283        let avail_len = __input.len();
20284        let mut payload_buf = [0; Self::ENCODED_LEN];
20285        let mut buf = if avail_len < Self::ENCODED_LEN {
20286            payload_buf[0..avail_len].copy_from_slice(__input);
20287            Bytes::new(&payload_buf)
20288        } else {
20289            Bytes::new(__input)
20290        };
20291        let mut __struct = Self::default();
20292        __struct.count = buf.get_u16_le();
20293        __struct.target_system = buf.get_u8();
20294        __struct.target_component = buf.get_u8();
20295        let tmp = buf.get_u8();
20296        __struct.mission_type =
20297            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20298                enum_type: "MavMissionType",
20299                value: tmp as u64,
20300            })?;
20301        __struct.opaque_id = buf.get_u32_le();
20302        Ok(__struct)
20303    }
20304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20305        let mut __tmp = BytesMut::new(bytes);
20306        #[allow(clippy::absurd_extreme_comparisons)]
20307        #[allow(unused_comparisons)]
20308        if __tmp.remaining() < Self::ENCODED_LEN {
20309            panic!(
20310                "buffer is too small (need {} bytes, but got {})",
20311                Self::ENCODED_LEN,
20312                __tmp.remaining(),
20313            )
20314        }
20315        __tmp.put_u16_le(self.count);
20316        __tmp.put_u8(self.target_system);
20317        __tmp.put_u8(self.target_component);
20318        if matches!(version, MavlinkVersion::V2) {
20319            __tmp.put_u8(self.mission_type as u8);
20320            __tmp.put_u32_le(self.opaque_id);
20321            let len = __tmp.len();
20322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20323        } else {
20324            __tmp.len()
20325        }
20326    }
20327}
20328#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20329#[doc = ""]
20330#[doc = "ID: 42"]
20331#[derive(Debug, Clone, PartialEq)]
20332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20334#[cfg_attr(feature = "ts", derive(TS))]
20335#[cfg_attr(feature = "ts", ts(export))]
20336pub struct MISSION_CURRENT_DATA {
20337    #[doc = "Sequence"]
20338    pub seq: u16,
20339    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20341    pub total: u16,
20342    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20343    #[cfg_attr(feature = "serde", serde(default))]
20344    pub mission_state: MissionState,
20345    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20347    pub mission_mode: u8,
20348    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20350    pub mission_id: u32,
20351    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20353    pub fence_id: u32,
20354    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20356    pub rally_points_id: u32,
20357}
20358impl MISSION_CURRENT_DATA {
20359    pub const ENCODED_LEN: usize = 18usize;
20360    pub const DEFAULT: Self = Self {
20361        seq: 0_u16,
20362        total: 0_u16,
20363        mission_state: MissionState::DEFAULT,
20364        mission_mode: 0_u8,
20365        mission_id: 0_u32,
20366        fence_id: 0_u32,
20367        rally_points_id: 0_u32,
20368    };
20369    #[cfg(feature = "arbitrary")]
20370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20371        use arbitrary::{Arbitrary, Unstructured};
20372        let mut buf = [0u8; 1024];
20373        rng.fill_bytes(&mut buf);
20374        let mut unstructured = Unstructured::new(&buf);
20375        Self::arbitrary(&mut unstructured).unwrap_or_default()
20376    }
20377}
20378impl Default for MISSION_CURRENT_DATA {
20379    fn default() -> Self {
20380        Self::DEFAULT.clone()
20381    }
20382}
20383impl MessageData for MISSION_CURRENT_DATA {
20384    type Message = MavMessage;
20385    const ID: u32 = 42u32;
20386    const NAME: &'static str = "MISSION_CURRENT";
20387    const EXTRA_CRC: u8 = 28u8;
20388    const ENCODED_LEN: usize = 18usize;
20389    fn deser(
20390        _version: MavlinkVersion,
20391        __input: &[u8],
20392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20393        let avail_len = __input.len();
20394        let mut payload_buf = [0; Self::ENCODED_LEN];
20395        let mut buf = if avail_len < Self::ENCODED_LEN {
20396            payload_buf[0..avail_len].copy_from_slice(__input);
20397            Bytes::new(&payload_buf)
20398        } else {
20399            Bytes::new(__input)
20400        };
20401        let mut __struct = Self::default();
20402        __struct.seq = buf.get_u16_le();
20403        __struct.total = buf.get_u16_le();
20404        let tmp = buf.get_u8();
20405        __struct.mission_state =
20406            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20407                enum_type: "MissionState",
20408                value: tmp as u64,
20409            })?;
20410        __struct.mission_mode = buf.get_u8();
20411        __struct.mission_id = buf.get_u32_le();
20412        __struct.fence_id = buf.get_u32_le();
20413        __struct.rally_points_id = buf.get_u32_le();
20414        Ok(__struct)
20415    }
20416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20417        let mut __tmp = BytesMut::new(bytes);
20418        #[allow(clippy::absurd_extreme_comparisons)]
20419        #[allow(unused_comparisons)]
20420        if __tmp.remaining() < Self::ENCODED_LEN {
20421            panic!(
20422                "buffer is too small (need {} bytes, but got {})",
20423                Self::ENCODED_LEN,
20424                __tmp.remaining(),
20425            )
20426        }
20427        __tmp.put_u16_le(self.seq);
20428        if matches!(version, MavlinkVersion::V2) {
20429            __tmp.put_u16_le(self.total);
20430            __tmp.put_u8(self.mission_state as u8);
20431            __tmp.put_u8(self.mission_mode);
20432            __tmp.put_u32_le(self.mission_id);
20433            __tmp.put_u32_le(self.fence_id);
20434            __tmp.put_u32_le(self.rally_points_id);
20435            let len = __tmp.len();
20436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20437        } else {
20438            __tmp.len()
20439        }
20440    }
20441}
20442#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20443#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20444#[doc = ""]
20445#[doc = "ID: 39"]
20446#[derive(Debug, Clone, PartialEq)]
20447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20449#[cfg_attr(feature = "ts", derive(TS))]
20450#[cfg_attr(feature = "ts", ts(export))]
20451pub struct MISSION_ITEM_DATA {
20452    #[doc = "PARAM1, see MAV_CMD enum"]
20453    pub param1: f32,
20454    #[doc = "PARAM2, see MAV_CMD enum"]
20455    pub param2: f32,
20456    #[doc = "PARAM3, see MAV_CMD enum"]
20457    pub param3: f32,
20458    #[doc = "PARAM4, see MAV_CMD enum"]
20459    pub param4: f32,
20460    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20461    pub x: f32,
20462    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20463    pub y: f32,
20464    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20465    pub z: f32,
20466    #[doc = "Sequence"]
20467    pub seq: u16,
20468    #[doc = "The scheduled action for the waypoint."]
20469    pub command: MavCmd,
20470    #[doc = "System ID"]
20471    pub target_system: u8,
20472    #[doc = "Component ID"]
20473    pub target_component: u8,
20474    #[doc = "The coordinate system of the waypoint."]
20475    pub frame: MavFrame,
20476    #[doc = "false:0, true:1"]
20477    pub current: u8,
20478    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20479    pub autocontinue: u8,
20480    #[doc = "Mission type."]
20481    #[cfg_attr(feature = "serde", serde(default))]
20482    pub mission_type: MavMissionType,
20483}
20484impl MISSION_ITEM_DATA {
20485    pub const ENCODED_LEN: usize = 38usize;
20486    pub const DEFAULT: Self = Self {
20487        param1: 0.0_f32,
20488        param2: 0.0_f32,
20489        param3: 0.0_f32,
20490        param4: 0.0_f32,
20491        x: 0.0_f32,
20492        y: 0.0_f32,
20493        z: 0.0_f32,
20494        seq: 0_u16,
20495        command: MavCmd::DEFAULT,
20496        target_system: 0_u8,
20497        target_component: 0_u8,
20498        frame: MavFrame::DEFAULT,
20499        current: 0_u8,
20500        autocontinue: 0_u8,
20501        mission_type: MavMissionType::DEFAULT,
20502    };
20503    #[cfg(feature = "arbitrary")]
20504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20505        use arbitrary::{Arbitrary, Unstructured};
20506        let mut buf = [0u8; 1024];
20507        rng.fill_bytes(&mut buf);
20508        let mut unstructured = Unstructured::new(&buf);
20509        Self::arbitrary(&mut unstructured).unwrap_or_default()
20510    }
20511}
20512impl Default for MISSION_ITEM_DATA {
20513    fn default() -> Self {
20514        Self::DEFAULT.clone()
20515    }
20516}
20517impl MessageData for MISSION_ITEM_DATA {
20518    type Message = MavMessage;
20519    const ID: u32 = 39u32;
20520    const NAME: &'static str = "MISSION_ITEM";
20521    const EXTRA_CRC: u8 = 254u8;
20522    const ENCODED_LEN: usize = 38usize;
20523    fn deser(
20524        _version: MavlinkVersion,
20525        __input: &[u8],
20526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20527        let avail_len = __input.len();
20528        let mut payload_buf = [0; Self::ENCODED_LEN];
20529        let mut buf = if avail_len < Self::ENCODED_LEN {
20530            payload_buf[0..avail_len].copy_from_slice(__input);
20531            Bytes::new(&payload_buf)
20532        } else {
20533            Bytes::new(__input)
20534        };
20535        let mut __struct = Self::default();
20536        __struct.param1 = buf.get_f32_le();
20537        __struct.param2 = buf.get_f32_le();
20538        __struct.param3 = buf.get_f32_le();
20539        __struct.param4 = buf.get_f32_le();
20540        __struct.x = buf.get_f32_le();
20541        __struct.y = buf.get_f32_le();
20542        __struct.z = buf.get_f32_le();
20543        __struct.seq = buf.get_u16_le();
20544        let tmp = buf.get_u16_le();
20545        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20546            ::mavlink_core::error::ParserError::InvalidEnum {
20547                enum_type: "MavCmd",
20548                value: tmp as u64,
20549            },
20550        )?;
20551        __struct.target_system = buf.get_u8();
20552        __struct.target_component = buf.get_u8();
20553        let tmp = buf.get_u8();
20554        __struct.frame =
20555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20556                enum_type: "MavFrame",
20557                value: tmp as u64,
20558            })?;
20559        __struct.current = buf.get_u8();
20560        __struct.autocontinue = buf.get_u8();
20561        let tmp = buf.get_u8();
20562        __struct.mission_type =
20563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20564                enum_type: "MavMissionType",
20565                value: tmp as u64,
20566            })?;
20567        Ok(__struct)
20568    }
20569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20570        let mut __tmp = BytesMut::new(bytes);
20571        #[allow(clippy::absurd_extreme_comparisons)]
20572        #[allow(unused_comparisons)]
20573        if __tmp.remaining() < Self::ENCODED_LEN {
20574            panic!(
20575                "buffer is too small (need {} bytes, but got {})",
20576                Self::ENCODED_LEN,
20577                __tmp.remaining(),
20578            )
20579        }
20580        __tmp.put_f32_le(self.param1);
20581        __tmp.put_f32_le(self.param2);
20582        __tmp.put_f32_le(self.param3);
20583        __tmp.put_f32_le(self.param4);
20584        __tmp.put_f32_le(self.x);
20585        __tmp.put_f32_le(self.y);
20586        __tmp.put_f32_le(self.z);
20587        __tmp.put_u16_le(self.seq);
20588        __tmp.put_u16_le(self.command as u16);
20589        __tmp.put_u8(self.target_system);
20590        __tmp.put_u8(self.target_component);
20591        __tmp.put_u8(self.frame as u8);
20592        __tmp.put_u8(self.current);
20593        __tmp.put_u8(self.autocontinue);
20594        if matches!(version, MavlinkVersion::V2) {
20595            __tmp.put_u8(self.mission_type as u8);
20596            let len = __tmp.len();
20597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20598        } else {
20599            __tmp.len()
20600        }
20601    }
20602}
20603#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20604#[doc = ""]
20605#[doc = "ID: 73"]
20606#[derive(Debug, Clone, PartialEq)]
20607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20609#[cfg_attr(feature = "ts", derive(TS))]
20610#[cfg_attr(feature = "ts", ts(export))]
20611pub struct MISSION_ITEM_INT_DATA {
20612    #[doc = "PARAM1, see MAV_CMD enum"]
20613    pub param1: f32,
20614    #[doc = "PARAM2, see MAV_CMD enum"]
20615    pub param2: f32,
20616    #[doc = "PARAM3, see MAV_CMD enum"]
20617    pub param3: f32,
20618    #[doc = "PARAM4, see MAV_CMD enum"]
20619    pub param4: f32,
20620    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20621    pub x: i32,
20622    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20623    pub y: i32,
20624    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20625    pub z: f32,
20626    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20627    pub seq: u16,
20628    #[doc = "The scheduled action for the waypoint."]
20629    pub command: MavCmd,
20630    #[doc = "System ID"]
20631    pub target_system: u8,
20632    #[doc = "Component ID"]
20633    pub target_component: u8,
20634    #[doc = "The coordinate system of the waypoint."]
20635    pub frame: MavFrame,
20636    #[doc = "false:0, true:1"]
20637    pub current: u8,
20638    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20639    pub autocontinue: u8,
20640    #[doc = "Mission type."]
20641    #[cfg_attr(feature = "serde", serde(default))]
20642    pub mission_type: MavMissionType,
20643}
20644impl MISSION_ITEM_INT_DATA {
20645    pub const ENCODED_LEN: usize = 38usize;
20646    pub const DEFAULT: Self = Self {
20647        param1: 0.0_f32,
20648        param2: 0.0_f32,
20649        param3: 0.0_f32,
20650        param4: 0.0_f32,
20651        x: 0_i32,
20652        y: 0_i32,
20653        z: 0.0_f32,
20654        seq: 0_u16,
20655        command: MavCmd::DEFAULT,
20656        target_system: 0_u8,
20657        target_component: 0_u8,
20658        frame: MavFrame::DEFAULT,
20659        current: 0_u8,
20660        autocontinue: 0_u8,
20661        mission_type: MavMissionType::DEFAULT,
20662    };
20663    #[cfg(feature = "arbitrary")]
20664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20665        use arbitrary::{Arbitrary, Unstructured};
20666        let mut buf = [0u8; 1024];
20667        rng.fill_bytes(&mut buf);
20668        let mut unstructured = Unstructured::new(&buf);
20669        Self::arbitrary(&mut unstructured).unwrap_or_default()
20670    }
20671}
20672impl Default for MISSION_ITEM_INT_DATA {
20673    fn default() -> Self {
20674        Self::DEFAULT.clone()
20675    }
20676}
20677impl MessageData for MISSION_ITEM_INT_DATA {
20678    type Message = MavMessage;
20679    const ID: u32 = 73u32;
20680    const NAME: &'static str = "MISSION_ITEM_INT";
20681    const EXTRA_CRC: u8 = 38u8;
20682    const ENCODED_LEN: usize = 38usize;
20683    fn deser(
20684        _version: MavlinkVersion,
20685        __input: &[u8],
20686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20687        let avail_len = __input.len();
20688        let mut payload_buf = [0; Self::ENCODED_LEN];
20689        let mut buf = if avail_len < Self::ENCODED_LEN {
20690            payload_buf[0..avail_len].copy_from_slice(__input);
20691            Bytes::new(&payload_buf)
20692        } else {
20693            Bytes::new(__input)
20694        };
20695        let mut __struct = Self::default();
20696        __struct.param1 = buf.get_f32_le();
20697        __struct.param2 = buf.get_f32_le();
20698        __struct.param3 = buf.get_f32_le();
20699        __struct.param4 = buf.get_f32_le();
20700        __struct.x = buf.get_i32_le();
20701        __struct.y = buf.get_i32_le();
20702        __struct.z = buf.get_f32_le();
20703        __struct.seq = buf.get_u16_le();
20704        let tmp = buf.get_u16_le();
20705        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20706            ::mavlink_core::error::ParserError::InvalidEnum {
20707                enum_type: "MavCmd",
20708                value: tmp as u64,
20709            },
20710        )?;
20711        __struct.target_system = buf.get_u8();
20712        __struct.target_component = buf.get_u8();
20713        let tmp = buf.get_u8();
20714        __struct.frame =
20715            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20716                enum_type: "MavFrame",
20717                value: tmp as u64,
20718            })?;
20719        __struct.current = buf.get_u8();
20720        __struct.autocontinue = buf.get_u8();
20721        let tmp = buf.get_u8();
20722        __struct.mission_type =
20723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20724                enum_type: "MavMissionType",
20725                value: tmp as u64,
20726            })?;
20727        Ok(__struct)
20728    }
20729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20730        let mut __tmp = BytesMut::new(bytes);
20731        #[allow(clippy::absurd_extreme_comparisons)]
20732        #[allow(unused_comparisons)]
20733        if __tmp.remaining() < Self::ENCODED_LEN {
20734            panic!(
20735                "buffer is too small (need {} bytes, but got {})",
20736                Self::ENCODED_LEN,
20737                __tmp.remaining(),
20738            )
20739        }
20740        __tmp.put_f32_le(self.param1);
20741        __tmp.put_f32_le(self.param2);
20742        __tmp.put_f32_le(self.param3);
20743        __tmp.put_f32_le(self.param4);
20744        __tmp.put_i32_le(self.x);
20745        __tmp.put_i32_le(self.y);
20746        __tmp.put_f32_le(self.z);
20747        __tmp.put_u16_le(self.seq);
20748        __tmp.put_u16_le(self.command as u16);
20749        __tmp.put_u8(self.target_system);
20750        __tmp.put_u8(self.target_component);
20751        __tmp.put_u8(self.frame as u8);
20752        __tmp.put_u8(self.current);
20753        __tmp.put_u8(self.autocontinue);
20754        if matches!(version, MavlinkVersion::V2) {
20755            __tmp.put_u8(self.mission_type as u8);
20756            let len = __tmp.len();
20757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20758        } else {
20759            __tmp.len()
20760        }
20761    }
20762}
20763#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20764#[doc = ""]
20765#[doc = "ID: 46"]
20766#[derive(Debug, Clone, PartialEq)]
20767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20769#[cfg_attr(feature = "ts", derive(TS))]
20770#[cfg_attr(feature = "ts", ts(export))]
20771pub struct MISSION_ITEM_REACHED_DATA {
20772    #[doc = "Sequence"]
20773    pub seq: u16,
20774}
20775impl MISSION_ITEM_REACHED_DATA {
20776    pub const ENCODED_LEN: usize = 2usize;
20777    pub const DEFAULT: Self = Self { seq: 0_u16 };
20778    #[cfg(feature = "arbitrary")]
20779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20780        use arbitrary::{Arbitrary, Unstructured};
20781        let mut buf = [0u8; 1024];
20782        rng.fill_bytes(&mut buf);
20783        let mut unstructured = Unstructured::new(&buf);
20784        Self::arbitrary(&mut unstructured).unwrap_or_default()
20785    }
20786}
20787impl Default for MISSION_ITEM_REACHED_DATA {
20788    fn default() -> Self {
20789        Self::DEFAULT.clone()
20790    }
20791}
20792impl MessageData for MISSION_ITEM_REACHED_DATA {
20793    type Message = MavMessage;
20794    const ID: u32 = 46u32;
20795    const NAME: &'static str = "MISSION_ITEM_REACHED";
20796    const EXTRA_CRC: u8 = 11u8;
20797    const ENCODED_LEN: usize = 2usize;
20798    fn deser(
20799        _version: MavlinkVersion,
20800        __input: &[u8],
20801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20802        let avail_len = __input.len();
20803        let mut payload_buf = [0; Self::ENCODED_LEN];
20804        let mut buf = if avail_len < Self::ENCODED_LEN {
20805            payload_buf[0..avail_len].copy_from_slice(__input);
20806            Bytes::new(&payload_buf)
20807        } else {
20808            Bytes::new(__input)
20809        };
20810        let mut __struct = Self::default();
20811        __struct.seq = buf.get_u16_le();
20812        Ok(__struct)
20813    }
20814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20815        let mut __tmp = BytesMut::new(bytes);
20816        #[allow(clippy::absurd_extreme_comparisons)]
20817        #[allow(unused_comparisons)]
20818        if __tmp.remaining() < Self::ENCODED_LEN {
20819            panic!(
20820                "buffer is too small (need {} bytes, but got {})",
20821                Self::ENCODED_LEN,
20822                __tmp.remaining(),
20823            )
20824        }
20825        __tmp.put_u16_le(self.seq);
20826        if matches!(version, MavlinkVersion::V2) {
20827            let len = __tmp.len();
20828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20829        } else {
20830            __tmp.len()
20831        }
20832    }
20833}
20834#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20835#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20836#[doc = ""]
20837#[doc = "ID: 40"]
20838#[derive(Debug, Clone, PartialEq)]
20839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20841#[cfg_attr(feature = "ts", derive(TS))]
20842#[cfg_attr(feature = "ts", ts(export))]
20843pub struct MISSION_REQUEST_DATA {
20844    #[doc = "Sequence"]
20845    pub seq: u16,
20846    #[doc = "System ID"]
20847    pub target_system: u8,
20848    #[doc = "Component ID"]
20849    pub target_component: u8,
20850    #[doc = "Mission type."]
20851    #[cfg_attr(feature = "serde", serde(default))]
20852    pub mission_type: MavMissionType,
20853}
20854impl MISSION_REQUEST_DATA {
20855    pub const ENCODED_LEN: usize = 5usize;
20856    pub const DEFAULT: Self = Self {
20857        seq: 0_u16,
20858        target_system: 0_u8,
20859        target_component: 0_u8,
20860        mission_type: MavMissionType::DEFAULT,
20861    };
20862    #[cfg(feature = "arbitrary")]
20863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20864        use arbitrary::{Arbitrary, Unstructured};
20865        let mut buf = [0u8; 1024];
20866        rng.fill_bytes(&mut buf);
20867        let mut unstructured = Unstructured::new(&buf);
20868        Self::arbitrary(&mut unstructured).unwrap_or_default()
20869    }
20870}
20871impl Default for MISSION_REQUEST_DATA {
20872    fn default() -> Self {
20873        Self::DEFAULT.clone()
20874    }
20875}
20876impl MessageData for MISSION_REQUEST_DATA {
20877    type Message = MavMessage;
20878    const ID: u32 = 40u32;
20879    const NAME: &'static str = "MISSION_REQUEST";
20880    const EXTRA_CRC: u8 = 230u8;
20881    const ENCODED_LEN: usize = 5usize;
20882    fn deser(
20883        _version: MavlinkVersion,
20884        __input: &[u8],
20885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20886        let avail_len = __input.len();
20887        let mut payload_buf = [0; Self::ENCODED_LEN];
20888        let mut buf = if avail_len < Self::ENCODED_LEN {
20889            payload_buf[0..avail_len].copy_from_slice(__input);
20890            Bytes::new(&payload_buf)
20891        } else {
20892            Bytes::new(__input)
20893        };
20894        let mut __struct = Self::default();
20895        __struct.seq = buf.get_u16_le();
20896        __struct.target_system = buf.get_u8();
20897        __struct.target_component = buf.get_u8();
20898        let tmp = buf.get_u8();
20899        __struct.mission_type =
20900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20901                enum_type: "MavMissionType",
20902                value: tmp as u64,
20903            })?;
20904        Ok(__struct)
20905    }
20906    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20907        let mut __tmp = BytesMut::new(bytes);
20908        #[allow(clippy::absurd_extreme_comparisons)]
20909        #[allow(unused_comparisons)]
20910        if __tmp.remaining() < Self::ENCODED_LEN {
20911            panic!(
20912                "buffer is too small (need {} bytes, but got {})",
20913                Self::ENCODED_LEN,
20914                __tmp.remaining(),
20915            )
20916        }
20917        __tmp.put_u16_le(self.seq);
20918        __tmp.put_u8(self.target_system);
20919        __tmp.put_u8(self.target_component);
20920        if matches!(version, MavlinkVersion::V2) {
20921            __tmp.put_u8(self.mission_type as u8);
20922            let len = __tmp.len();
20923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20924        } else {
20925            __tmp.len()
20926        }
20927    }
20928}
20929#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20930#[doc = ""]
20931#[doc = "ID: 51"]
20932#[derive(Debug, Clone, PartialEq)]
20933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20935#[cfg_attr(feature = "ts", derive(TS))]
20936#[cfg_attr(feature = "ts", ts(export))]
20937pub struct MISSION_REQUEST_INT_DATA {
20938    #[doc = "Sequence"]
20939    pub seq: u16,
20940    #[doc = "System ID"]
20941    pub target_system: u8,
20942    #[doc = "Component ID"]
20943    pub target_component: u8,
20944    #[doc = "Mission type."]
20945    #[cfg_attr(feature = "serde", serde(default))]
20946    pub mission_type: MavMissionType,
20947}
20948impl MISSION_REQUEST_INT_DATA {
20949    pub const ENCODED_LEN: usize = 5usize;
20950    pub const DEFAULT: Self = Self {
20951        seq: 0_u16,
20952        target_system: 0_u8,
20953        target_component: 0_u8,
20954        mission_type: MavMissionType::DEFAULT,
20955    };
20956    #[cfg(feature = "arbitrary")]
20957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20958        use arbitrary::{Arbitrary, Unstructured};
20959        let mut buf = [0u8; 1024];
20960        rng.fill_bytes(&mut buf);
20961        let mut unstructured = Unstructured::new(&buf);
20962        Self::arbitrary(&mut unstructured).unwrap_or_default()
20963    }
20964}
20965impl Default for MISSION_REQUEST_INT_DATA {
20966    fn default() -> Self {
20967        Self::DEFAULT.clone()
20968    }
20969}
20970impl MessageData for MISSION_REQUEST_INT_DATA {
20971    type Message = MavMessage;
20972    const ID: u32 = 51u32;
20973    const NAME: &'static str = "MISSION_REQUEST_INT";
20974    const EXTRA_CRC: u8 = 196u8;
20975    const ENCODED_LEN: usize = 5usize;
20976    fn deser(
20977        _version: MavlinkVersion,
20978        __input: &[u8],
20979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20980        let avail_len = __input.len();
20981        let mut payload_buf = [0; Self::ENCODED_LEN];
20982        let mut buf = if avail_len < Self::ENCODED_LEN {
20983            payload_buf[0..avail_len].copy_from_slice(__input);
20984            Bytes::new(&payload_buf)
20985        } else {
20986            Bytes::new(__input)
20987        };
20988        let mut __struct = Self::default();
20989        __struct.seq = buf.get_u16_le();
20990        __struct.target_system = buf.get_u8();
20991        __struct.target_component = buf.get_u8();
20992        let tmp = buf.get_u8();
20993        __struct.mission_type =
20994            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20995                enum_type: "MavMissionType",
20996                value: tmp as u64,
20997            })?;
20998        Ok(__struct)
20999    }
21000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21001        let mut __tmp = BytesMut::new(bytes);
21002        #[allow(clippy::absurd_extreme_comparisons)]
21003        #[allow(unused_comparisons)]
21004        if __tmp.remaining() < Self::ENCODED_LEN {
21005            panic!(
21006                "buffer is too small (need {} bytes, but got {})",
21007                Self::ENCODED_LEN,
21008                __tmp.remaining(),
21009            )
21010        }
21011        __tmp.put_u16_le(self.seq);
21012        __tmp.put_u8(self.target_system);
21013        __tmp.put_u8(self.target_component);
21014        if matches!(version, MavlinkVersion::V2) {
21015            __tmp.put_u8(self.mission_type as u8);
21016            let len = __tmp.len();
21017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21018        } else {
21019            __tmp.len()
21020        }
21021    }
21022}
21023#[doc = "Request the overall list of mission items from the system/component."]
21024#[doc = ""]
21025#[doc = "ID: 43"]
21026#[derive(Debug, Clone, PartialEq)]
21027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21029#[cfg_attr(feature = "ts", derive(TS))]
21030#[cfg_attr(feature = "ts", ts(export))]
21031pub struct MISSION_REQUEST_LIST_DATA {
21032    #[doc = "System ID"]
21033    pub target_system: u8,
21034    #[doc = "Component ID"]
21035    pub target_component: u8,
21036    #[doc = "Mission type."]
21037    #[cfg_attr(feature = "serde", serde(default))]
21038    pub mission_type: MavMissionType,
21039}
21040impl MISSION_REQUEST_LIST_DATA {
21041    pub const ENCODED_LEN: usize = 3usize;
21042    pub const DEFAULT: Self = Self {
21043        target_system: 0_u8,
21044        target_component: 0_u8,
21045        mission_type: MavMissionType::DEFAULT,
21046    };
21047    #[cfg(feature = "arbitrary")]
21048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21049        use arbitrary::{Arbitrary, Unstructured};
21050        let mut buf = [0u8; 1024];
21051        rng.fill_bytes(&mut buf);
21052        let mut unstructured = Unstructured::new(&buf);
21053        Self::arbitrary(&mut unstructured).unwrap_or_default()
21054    }
21055}
21056impl Default for MISSION_REQUEST_LIST_DATA {
21057    fn default() -> Self {
21058        Self::DEFAULT.clone()
21059    }
21060}
21061impl MessageData for MISSION_REQUEST_LIST_DATA {
21062    type Message = MavMessage;
21063    const ID: u32 = 43u32;
21064    const NAME: &'static str = "MISSION_REQUEST_LIST";
21065    const EXTRA_CRC: u8 = 132u8;
21066    const ENCODED_LEN: usize = 3usize;
21067    fn deser(
21068        _version: MavlinkVersion,
21069        __input: &[u8],
21070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21071        let avail_len = __input.len();
21072        let mut payload_buf = [0; Self::ENCODED_LEN];
21073        let mut buf = if avail_len < Self::ENCODED_LEN {
21074            payload_buf[0..avail_len].copy_from_slice(__input);
21075            Bytes::new(&payload_buf)
21076        } else {
21077            Bytes::new(__input)
21078        };
21079        let mut __struct = Self::default();
21080        __struct.target_system = buf.get_u8();
21081        __struct.target_component = buf.get_u8();
21082        let tmp = buf.get_u8();
21083        __struct.mission_type =
21084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21085                enum_type: "MavMissionType",
21086                value: tmp as u64,
21087            })?;
21088        Ok(__struct)
21089    }
21090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21091        let mut __tmp = BytesMut::new(bytes);
21092        #[allow(clippy::absurd_extreme_comparisons)]
21093        #[allow(unused_comparisons)]
21094        if __tmp.remaining() < Self::ENCODED_LEN {
21095            panic!(
21096                "buffer is too small (need {} bytes, but got {})",
21097                Self::ENCODED_LEN,
21098                __tmp.remaining(),
21099            )
21100        }
21101        __tmp.put_u8(self.target_system);
21102        __tmp.put_u8(self.target_component);
21103        if matches!(version, MavlinkVersion::V2) {
21104            __tmp.put_u8(self.mission_type as u8);
21105            let len = __tmp.len();
21106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21107        } else {
21108            __tmp.len()
21109        }
21110    }
21111}
21112#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21113#[doc = ""]
21114#[doc = "ID: 37"]
21115#[derive(Debug, Clone, PartialEq)]
21116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21118#[cfg_attr(feature = "ts", derive(TS))]
21119#[cfg_attr(feature = "ts", ts(export))]
21120pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21121    #[doc = "Start index"]
21122    pub start_index: i16,
21123    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21124    pub end_index: i16,
21125    #[doc = "System ID"]
21126    pub target_system: u8,
21127    #[doc = "Component ID"]
21128    pub target_component: u8,
21129    #[doc = "Mission type."]
21130    #[cfg_attr(feature = "serde", serde(default))]
21131    pub mission_type: MavMissionType,
21132}
21133impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21134    pub const ENCODED_LEN: usize = 7usize;
21135    pub const DEFAULT: Self = Self {
21136        start_index: 0_i16,
21137        end_index: 0_i16,
21138        target_system: 0_u8,
21139        target_component: 0_u8,
21140        mission_type: MavMissionType::DEFAULT,
21141    };
21142    #[cfg(feature = "arbitrary")]
21143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21144        use arbitrary::{Arbitrary, Unstructured};
21145        let mut buf = [0u8; 1024];
21146        rng.fill_bytes(&mut buf);
21147        let mut unstructured = Unstructured::new(&buf);
21148        Self::arbitrary(&mut unstructured).unwrap_or_default()
21149    }
21150}
21151impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21152    fn default() -> Self {
21153        Self::DEFAULT.clone()
21154    }
21155}
21156impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21157    type Message = MavMessage;
21158    const ID: u32 = 37u32;
21159    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21160    const EXTRA_CRC: u8 = 212u8;
21161    const ENCODED_LEN: usize = 7usize;
21162    fn deser(
21163        _version: MavlinkVersion,
21164        __input: &[u8],
21165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21166        let avail_len = __input.len();
21167        let mut payload_buf = [0; Self::ENCODED_LEN];
21168        let mut buf = if avail_len < Self::ENCODED_LEN {
21169            payload_buf[0..avail_len].copy_from_slice(__input);
21170            Bytes::new(&payload_buf)
21171        } else {
21172            Bytes::new(__input)
21173        };
21174        let mut __struct = Self::default();
21175        __struct.start_index = buf.get_i16_le();
21176        __struct.end_index = buf.get_i16_le();
21177        __struct.target_system = buf.get_u8();
21178        __struct.target_component = buf.get_u8();
21179        let tmp = buf.get_u8();
21180        __struct.mission_type =
21181            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21182                enum_type: "MavMissionType",
21183                value: tmp as u64,
21184            })?;
21185        Ok(__struct)
21186    }
21187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21188        let mut __tmp = BytesMut::new(bytes);
21189        #[allow(clippy::absurd_extreme_comparisons)]
21190        #[allow(unused_comparisons)]
21191        if __tmp.remaining() < Self::ENCODED_LEN {
21192            panic!(
21193                "buffer is too small (need {} bytes, but got {})",
21194                Self::ENCODED_LEN,
21195                __tmp.remaining(),
21196            )
21197        }
21198        __tmp.put_i16_le(self.start_index);
21199        __tmp.put_i16_le(self.end_index);
21200        __tmp.put_u8(self.target_system);
21201        __tmp.put_u8(self.target_component);
21202        if matches!(version, MavlinkVersion::V2) {
21203            __tmp.put_u8(self.mission_type as u8);
21204            let len = __tmp.len();
21205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21206        } else {
21207            __tmp.len()
21208        }
21209    }
21210}
21211#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21212#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21213#[doc = ""]
21214#[doc = "ID: 41"]
21215#[derive(Debug, Clone, PartialEq)]
21216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21218#[cfg_attr(feature = "ts", derive(TS))]
21219#[cfg_attr(feature = "ts", ts(export))]
21220pub struct MISSION_SET_CURRENT_DATA {
21221    #[doc = "Sequence"]
21222    pub seq: u16,
21223    #[doc = "System ID"]
21224    pub target_system: u8,
21225    #[doc = "Component ID"]
21226    pub target_component: u8,
21227}
21228impl MISSION_SET_CURRENT_DATA {
21229    pub const ENCODED_LEN: usize = 4usize;
21230    pub const DEFAULT: Self = Self {
21231        seq: 0_u16,
21232        target_system: 0_u8,
21233        target_component: 0_u8,
21234    };
21235    #[cfg(feature = "arbitrary")]
21236    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21237        use arbitrary::{Arbitrary, Unstructured};
21238        let mut buf = [0u8; 1024];
21239        rng.fill_bytes(&mut buf);
21240        let mut unstructured = Unstructured::new(&buf);
21241        Self::arbitrary(&mut unstructured).unwrap_or_default()
21242    }
21243}
21244impl Default for MISSION_SET_CURRENT_DATA {
21245    fn default() -> Self {
21246        Self::DEFAULT.clone()
21247    }
21248}
21249impl MessageData for MISSION_SET_CURRENT_DATA {
21250    type Message = MavMessage;
21251    const ID: u32 = 41u32;
21252    const NAME: &'static str = "MISSION_SET_CURRENT";
21253    const EXTRA_CRC: u8 = 28u8;
21254    const ENCODED_LEN: usize = 4usize;
21255    fn deser(
21256        _version: MavlinkVersion,
21257        __input: &[u8],
21258    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21259        let avail_len = __input.len();
21260        let mut payload_buf = [0; Self::ENCODED_LEN];
21261        let mut buf = if avail_len < Self::ENCODED_LEN {
21262            payload_buf[0..avail_len].copy_from_slice(__input);
21263            Bytes::new(&payload_buf)
21264        } else {
21265            Bytes::new(__input)
21266        };
21267        let mut __struct = Self::default();
21268        __struct.seq = buf.get_u16_le();
21269        __struct.target_system = buf.get_u8();
21270        __struct.target_component = buf.get_u8();
21271        Ok(__struct)
21272    }
21273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21274        let mut __tmp = BytesMut::new(bytes);
21275        #[allow(clippy::absurd_extreme_comparisons)]
21276        #[allow(unused_comparisons)]
21277        if __tmp.remaining() < Self::ENCODED_LEN {
21278            panic!(
21279                "buffer is too small (need {} bytes, but got {})",
21280                Self::ENCODED_LEN,
21281                __tmp.remaining(),
21282            )
21283        }
21284        __tmp.put_u16_le(self.seq);
21285        __tmp.put_u8(self.target_system);
21286        __tmp.put_u8(self.target_component);
21287        if matches!(version, MavlinkVersion::V2) {
21288            let len = __tmp.len();
21289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21290        } else {
21291            __tmp.len()
21292        }
21293    }
21294}
21295#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21296#[doc = ""]
21297#[doc = "ID: 38"]
21298#[derive(Debug, Clone, PartialEq)]
21299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21301#[cfg_attr(feature = "ts", derive(TS))]
21302#[cfg_attr(feature = "ts", ts(export))]
21303pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21304    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21305    pub start_index: i16,
21306    #[doc = "End index, equal or greater than start index."]
21307    pub end_index: i16,
21308    #[doc = "System ID"]
21309    pub target_system: u8,
21310    #[doc = "Component ID"]
21311    pub target_component: u8,
21312    #[doc = "Mission type."]
21313    #[cfg_attr(feature = "serde", serde(default))]
21314    pub mission_type: MavMissionType,
21315}
21316impl MISSION_WRITE_PARTIAL_LIST_DATA {
21317    pub const ENCODED_LEN: usize = 7usize;
21318    pub const DEFAULT: Self = Self {
21319        start_index: 0_i16,
21320        end_index: 0_i16,
21321        target_system: 0_u8,
21322        target_component: 0_u8,
21323        mission_type: MavMissionType::DEFAULT,
21324    };
21325    #[cfg(feature = "arbitrary")]
21326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21327        use arbitrary::{Arbitrary, Unstructured};
21328        let mut buf = [0u8; 1024];
21329        rng.fill_bytes(&mut buf);
21330        let mut unstructured = Unstructured::new(&buf);
21331        Self::arbitrary(&mut unstructured).unwrap_or_default()
21332    }
21333}
21334impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21335    fn default() -> Self {
21336        Self::DEFAULT.clone()
21337    }
21338}
21339impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21340    type Message = MavMessage;
21341    const ID: u32 = 38u32;
21342    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21343    const EXTRA_CRC: u8 = 9u8;
21344    const ENCODED_LEN: usize = 7usize;
21345    fn deser(
21346        _version: MavlinkVersion,
21347        __input: &[u8],
21348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21349        let avail_len = __input.len();
21350        let mut payload_buf = [0; Self::ENCODED_LEN];
21351        let mut buf = if avail_len < Self::ENCODED_LEN {
21352            payload_buf[0..avail_len].copy_from_slice(__input);
21353            Bytes::new(&payload_buf)
21354        } else {
21355            Bytes::new(__input)
21356        };
21357        let mut __struct = Self::default();
21358        __struct.start_index = buf.get_i16_le();
21359        __struct.end_index = buf.get_i16_le();
21360        __struct.target_system = buf.get_u8();
21361        __struct.target_component = buf.get_u8();
21362        let tmp = buf.get_u8();
21363        __struct.mission_type =
21364            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21365                enum_type: "MavMissionType",
21366                value: tmp as u64,
21367            })?;
21368        Ok(__struct)
21369    }
21370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21371        let mut __tmp = BytesMut::new(bytes);
21372        #[allow(clippy::absurd_extreme_comparisons)]
21373        #[allow(unused_comparisons)]
21374        if __tmp.remaining() < Self::ENCODED_LEN {
21375            panic!(
21376                "buffer is too small (need {} bytes, but got {})",
21377                Self::ENCODED_LEN,
21378                __tmp.remaining(),
21379            )
21380        }
21381        __tmp.put_i16_le(self.start_index);
21382        __tmp.put_i16_le(self.end_index);
21383        __tmp.put_u8(self.target_system);
21384        __tmp.put_u8(self.target_component);
21385        if matches!(version, MavlinkVersion::V2) {
21386            __tmp.put_u8(self.mission_type as u8);
21387            let len = __tmp.len();
21388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21389        } else {
21390            __tmp.len()
21391        }
21392    }
21393}
21394#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21395#[doc = "Orientation of a mount."]
21396#[doc = ""]
21397#[doc = "ID: 265"]
21398#[derive(Debug, Clone, PartialEq)]
21399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21401#[cfg_attr(feature = "ts", derive(TS))]
21402#[cfg_attr(feature = "ts", ts(export))]
21403pub struct MOUNT_ORIENTATION_DATA {
21404    #[doc = "Timestamp (time since system boot)."]
21405    pub time_boot_ms: u32,
21406    #[doc = "Roll in global frame (set to NaN for invalid)."]
21407    pub roll: f32,
21408    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21409    pub pitch: f32,
21410    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21411    pub yaw: f32,
21412    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21413    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21414    pub yaw_absolute: f32,
21415}
21416impl MOUNT_ORIENTATION_DATA {
21417    pub const ENCODED_LEN: usize = 20usize;
21418    pub const DEFAULT: Self = Self {
21419        time_boot_ms: 0_u32,
21420        roll: 0.0_f32,
21421        pitch: 0.0_f32,
21422        yaw: 0.0_f32,
21423        yaw_absolute: 0.0_f32,
21424    };
21425    #[cfg(feature = "arbitrary")]
21426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21427        use arbitrary::{Arbitrary, Unstructured};
21428        let mut buf = [0u8; 1024];
21429        rng.fill_bytes(&mut buf);
21430        let mut unstructured = Unstructured::new(&buf);
21431        Self::arbitrary(&mut unstructured).unwrap_or_default()
21432    }
21433}
21434impl Default for MOUNT_ORIENTATION_DATA {
21435    fn default() -> Self {
21436        Self::DEFAULT.clone()
21437    }
21438}
21439impl MessageData for MOUNT_ORIENTATION_DATA {
21440    type Message = MavMessage;
21441    const ID: u32 = 265u32;
21442    const NAME: &'static str = "MOUNT_ORIENTATION";
21443    const EXTRA_CRC: u8 = 26u8;
21444    const ENCODED_LEN: usize = 20usize;
21445    fn deser(
21446        _version: MavlinkVersion,
21447        __input: &[u8],
21448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21449        let avail_len = __input.len();
21450        let mut payload_buf = [0; Self::ENCODED_LEN];
21451        let mut buf = if avail_len < Self::ENCODED_LEN {
21452            payload_buf[0..avail_len].copy_from_slice(__input);
21453            Bytes::new(&payload_buf)
21454        } else {
21455            Bytes::new(__input)
21456        };
21457        let mut __struct = Self::default();
21458        __struct.time_boot_ms = buf.get_u32_le();
21459        __struct.roll = buf.get_f32_le();
21460        __struct.pitch = buf.get_f32_le();
21461        __struct.yaw = buf.get_f32_le();
21462        __struct.yaw_absolute = buf.get_f32_le();
21463        Ok(__struct)
21464    }
21465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21466        let mut __tmp = BytesMut::new(bytes);
21467        #[allow(clippy::absurd_extreme_comparisons)]
21468        #[allow(unused_comparisons)]
21469        if __tmp.remaining() < Self::ENCODED_LEN {
21470            panic!(
21471                "buffer is too small (need {} bytes, but got {})",
21472                Self::ENCODED_LEN,
21473                __tmp.remaining(),
21474            )
21475        }
21476        __tmp.put_u32_le(self.time_boot_ms);
21477        __tmp.put_f32_le(self.roll);
21478        __tmp.put_f32_le(self.pitch);
21479        __tmp.put_f32_le(self.yaw);
21480        if matches!(version, MavlinkVersion::V2) {
21481            __tmp.put_f32_le(self.yaw_absolute);
21482            let len = __tmp.len();
21483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21484        } else {
21485            __tmp.len()
21486        }
21487    }
21488}
21489#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21490#[doc = ""]
21491#[doc = "ID: 251"]
21492#[derive(Debug, Clone, PartialEq)]
21493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21495#[cfg_attr(feature = "ts", derive(TS))]
21496#[cfg_attr(feature = "ts", ts(export))]
21497pub struct NAMED_VALUE_FLOAT_DATA {
21498    #[doc = "Timestamp (time since system boot)."]
21499    pub time_boot_ms: u32,
21500    #[doc = "Floating point value"]
21501    pub value: f32,
21502    #[doc = "Name of the debug variable"]
21503    #[cfg_attr(feature = "ts", ts(type = "string"))]
21504    pub name: CharArray<10>,
21505}
21506impl NAMED_VALUE_FLOAT_DATA {
21507    pub const ENCODED_LEN: usize = 18usize;
21508    pub const DEFAULT: Self = Self {
21509        time_boot_ms: 0_u32,
21510        value: 0.0_f32,
21511        name: CharArray::new([0_u8; 10usize]),
21512    };
21513    #[cfg(feature = "arbitrary")]
21514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21515        use arbitrary::{Arbitrary, Unstructured};
21516        let mut buf = [0u8; 1024];
21517        rng.fill_bytes(&mut buf);
21518        let mut unstructured = Unstructured::new(&buf);
21519        Self::arbitrary(&mut unstructured).unwrap_or_default()
21520    }
21521}
21522impl Default for NAMED_VALUE_FLOAT_DATA {
21523    fn default() -> Self {
21524        Self::DEFAULT.clone()
21525    }
21526}
21527impl MessageData for NAMED_VALUE_FLOAT_DATA {
21528    type Message = MavMessage;
21529    const ID: u32 = 251u32;
21530    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21531    const EXTRA_CRC: u8 = 170u8;
21532    const ENCODED_LEN: usize = 18usize;
21533    fn deser(
21534        _version: MavlinkVersion,
21535        __input: &[u8],
21536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21537        let avail_len = __input.len();
21538        let mut payload_buf = [0; Self::ENCODED_LEN];
21539        let mut buf = if avail_len < Self::ENCODED_LEN {
21540            payload_buf[0..avail_len].copy_from_slice(__input);
21541            Bytes::new(&payload_buf)
21542        } else {
21543            Bytes::new(__input)
21544        };
21545        let mut __struct = Self::default();
21546        __struct.time_boot_ms = buf.get_u32_le();
21547        __struct.value = buf.get_f32_le();
21548        let mut tmp = [0_u8; 10usize];
21549        for v in &mut tmp {
21550            *v = buf.get_u8();
21551        }
21552        __struct.name = CharArray::new(tmp);
21553        Ok(__struct)
21554    }
21555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21556        let mut __tmp = BytesMut::new(bytes);
21557        #[allow(clippy::absurd_extreme_comparisons)]
21558        #[allow(unused_comparisons)]
21559        if __tmp.remaining() < Self::ENCODED_LEN {
21560            panic!(
21561                "buffer is too small (need {} bytes, but got {})",
21562                Self::ENCODED_LEN,
21563                __tmp.remaining(),
21564            )
21565        }
21566        __tmp.put_u32_le(self.time_boot_ms);
21567        __tmp.put_f32_le(self.value);
21568        for val in &self.name {
21569            __tmp.put_u8(*val);
21570        }
21571        if matches!(version, MavlinkVersion::V2) {
21572            let len = __tmp.len();
21573            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21574        } else {
21575            __tmp.len()
21576        }
21577    }
21578}
21579#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21580#[doc = ""]
21581#[doc = "ID: 252"]
21582#[derive(Debug, Clone, PartialEq)]
21583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21585#[cfg_attr(feature = "ts", derive(TS))]
21586#[cfg_attr(feature = "ts", ts(export))]
21587pub struct NAMED_VALUE_INT_DATA {
21588    #[doc = "Timestamp (time since system boot)."]
21589    pub time_boot_ms: u32,
21590    #[doc = "Signed integer value"]
21591    pub value: i32,
21592    #[doc = "Name of the debug variable"]
21593    #[cfg_attr(feature = "ts", ts(type = "string"))]
21594    pub name: CharArray<10>,
21595}
21596impl NAMED_VALUE_INT_DATA {
21597    pub const ENCODED_LEN: usize = 18usize;
21598    pub const DEFAULT: Self = Self {
21599        time_boot_ms: 0_u32,
21600        value: 0_i32,
21601        name: CharArray::new([0_u8; 10usize]),
21602    };
21603    #[cfg(feature = "arbitrary")]
21604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21605        use arbitrary::{Arbitrary, Unstructured};
21606        let mut buf = [0u8; 1024];
21607        rng.fill_bytes(&mut buf);
21608        let mut unstructured = Unstructured::new(&buf);
21609        Self::arbitrary(&mut unstructured).unwrap_or_default()
21610    }
21611}
21612impl Default for NAMED_VALUE_INT_DATA {
21613    fn default() -> Self {
21614        Self::DEFAULT.clone()
21615    }
21616}
21617impl MessageData for NAMED_VALUE_INT_DATA {
21618    type Message = MavMessage;
21619    const ID: u32 = 252u32;
21620    const NAME: &'static str = "NAMED_VALUE_INT";
21621    const EXTRA_CRC: u8 = 44u8;
21622    const ENCODED_LEN: usize = 18usize;
21623    fn deser(
21624        _version: MavlinkVersion,
21625        __input: &[u8],
21626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21627        let avail_len = __input.len();
21628        let mut payload_buf = [0; Self::ENCODED_LEN];
21629        let mut buf = if avail_len < Self::ENCODED_LEN {
21630            payload_buf[0..avail_len].copy_from_slice(__input);
21631            Bytes::new(&payload_buf)
21632        } else {
21633            Bytes::new(__input)
21634        };
21635        let mut __struct = Self::default();
21636        __struct.time_boot_ms = buf.get_u32_le();
21637        __struct.value = buf.get_i32_le();
21638        let mut tmp = [0_u8; 10usize];
21639        for v in &mut tmp {
21640            *v = buf.get_u8();
21641        }
21642        __struct.name = CharArray::new(tmp);
21643        Ok(__struct)
21644    }
21645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21646        let mut __tmp = BytesMut::new(bytes);
21647        #[allow(clippy::absurd_extreme_comparisons)]
21648        #[allow(unused_comparisons)]
21649        if __tmp.remaining() < Self::ENCODED_LEN {
21650            panic!(
21651                "buffer is too small (need {} bytes, but got {})",
21652                Self::ENCODED_LEN,
21653                __tmp.remaining(),
21654            )
21655        }
21656        __tmp.put_u32_le(self.time_boot_ms);
21657        __tmp.put_i32_le(self.value);
21658        for val in &self.name {
21659            __tmp.put_u8(*val);
21660        }
21661        if matches!(version, MavlinkVersion::V2) {
21662            let len = __tmp.len();
21663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21664        } else {
21665            __tmp.len()
21666        }
21667    }
21668}
21669#[doc = "The state of the navigation and position controller."]
21670#[doc = ""]
21671#[doc = "ID: 62"]
21672#[derive(Debug, Clone, PartialEq)]
21673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21675#[cfg_attr(feature = "ts", derive(TS))]
21676#[cfg_attr(feature = "ts", ts(export))]
21677pub struct NAV_CONTROLLER_OUTPUT_DATA {
21678    #[doc = "Current desired roll"]
21679    pub nav_roll: f32,
21680    #[doc = "Current desired pitch"]
21681    pub nav_pitch: f32,
21682    #[doc = "Current altitude error"]
21683    pub alt_error: f32,
21684    #[doc = "Current airspeed error"]
21685    pub aspd_error: f32,
21686    #[doc = "Current crosstrack error on x-y plane"]
21687    pub xtrack_error: f32,
21688    #[doc = "Current desired heading"]
21689    pub nav_bearing: i16,
21690    #[doc = "Bearing to current waypoint/target"]
21691    pub target_bearing: i16,
21692    #[doc = "Distance to active waypoint"]
21693    pub wp_dist: u16,
21694}
21695impl NAV_CONTROLLER_OUTPUT_DATA {
21696    pub const ENCODED_LEN: usize = 26usize;
21697    pub const DEFAULT: Self = Self {
21698        nav_roll: 0.0_f32,
21699        nav_pitch: 0.0_f32,
21700        alt_error: 0.0_f32,
21701        aspd_error: 0.0_f32,
21702        xtrack_error: 0.0_f32,
21703        nav_bearing: 0_i16,
21704        target_bearing: 0_i16,
21705        wp_dist: 0_u16,
21706    };
21707    #[cfg(feature = "arbitrary")]
21708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21709        use arbitrary::{Arbitrary, Unstructured};
21710        let mut buf = [0u8; 1024];
21711        rng.fill_bytes(&mut buf);
21712        let mut unstructured = Unstructured::new(&buf);
21713        Self::arbitrary(&mut unstructured).unwrap_or_default()
21714    }
21715}
21716impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21717    fn default() -> Self {
21718        Self::DEFAULT.clone()
21719    }
21720}
21721impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21722    type Message = MavMessage;
21723    const ID: u32 = 62u32;
21724    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21725    const EXTRA_CRC: u8 = 183u8;
21726    const ENCODED_LEN: usize = 26usize;
21727    fn deser(
21728        _version: MavlinkVersion,
21729        __input: &[u8],
21730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21731        let avail_len = __input.len();
21732        let mut payload_buf = [0; Self::ENCODED_LEN];
21733        let mut buf = if avail_len < Self::ENCODED_LEN {
21734            payload_buf[0..avail_len].copy_from_slice(__input);
21735            Bytes::new(&payload_buf)
21736        } else {
21737            Bytes::new(__input)
21738        };
21739        let mut __struct = Self::default();
21740        __struct.nav_roll = buf.get_f32_le();
21741        __struct.nav_pitch = buf.get_f32_le();
21742        __struct.alt_error = buf.get_f32_le();
21743        __struct.aspd_error = buf.get_f32_le();
21744        __struct.xtrack_error = buf.get_f32_le();
21745        __struct.nav_bearing = buf.get_i16_le();
21746        __struct.target_bearing = buf.get_i16_le();
21747        __struct.wp_dist = buf.get_u16_le();
21748        Ok(__struct)
21749    }
21750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21751        let mut __tmp = BytesMut::new(bytes);
21752        #[allow(clippy::absurd_extreme_comparisons)]
21753        #[allow(unused_comparisons)]
21754        if __tmp.remaining() < Self::ENCODED_LEN {
21755            panic!(
21756                "buffer is too small (need {} bytes, but got {})",
21757                Self::ENCODED_LEN,
21758                __tmp.remaining(),
21759            )
21760        }
21761        __tmp.put_f32_le(self.nav_roll);
21762        __tmp.put_f32_le(self.nav_pitch);
21763        __tmp.put_f32_le(self.alt_error);
21764        __tmp.put_f32_le(self.aspd_error);
21765        __tmp.put_f32_le(self.xtrack_error);
21766        __tmp.put_i16_le(self.nav_bearing);
21767        __tmp.put_i16_le(self.target_bearing);
21768        __tmp.put_u16_le(self.wp_dist);
21769        if matches!(version, MavlinkVersion::V2) {
21770            let len = __tmp.len();
21771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21772        } else {
21773            __tmp.len()
21774        }
21775    }
21776}
21777#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21778#[doc = ""]
21779#[doc = "ID: 330"]
21780#[derive(Debug, Clone, PartialEq)]
21781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21783#[cfg_attr(feature = "ts", derive(TS))]
21784#[cfg_attr(feature = "ts", ts(export))]
21785pub struct OBSTACLE_DISTANCE_DATA {
21786    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21787    pub time_usec: u64,
21788    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21791    pub distances: [u16; 72],
21792    #[doc = "Minimum distance the sensor can measure."]
21793    pub min_distance: u16,
21794    #[doc = "Maximum distance the sensor can measure."]
21795    pub max_distance: u16,
21796    #[doc = "Class id of the distance sensor type."]
21797    pub sensor_type: MavDistanceSensor,
21798    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21799    pub increment: u8,
21800    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21802    pub increment_f: f32,
21803    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21804    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21805    pub angle_offset: f32,
21806    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21807    #[cfg_attr(feature = "serde", serde(default))]
21808    pub frame: MavFrame,
21809}
21810impl OBSTACLE_DISTANCE_DATA {
21811    pub const ENCODED_LEN: usize = 167usize;
21812    pub const DEFAULT: Self = Self {
21813        time_usec: 0_u64,
21814        distances: [0_u16; 72usize],
21815        min_distance: 0_u16,
21816        max_distance: 0_u16,
21817        sensor_type: MavDistanceSensor::DEFAULT,
21818        increment: 0_u8,
21819        increment_f: 0.0_f32,
21820        angle_offset: 0.0_f32,
21821        frame: MavFrame::DEFAULT,
21822    };
21823    #[cfg(feature = "arbitrary")]
21824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21825        use arbitrary::{Arbitrary, Unstructured};
21826        let mut buf = [0u8; 1024];
21827        rng.fill_bytes(&mut buf);
21828        let mut unstructured = Unstructured::new(&buf);
21829        Self::arbitrary(&mut unstructured).unwrap_or_default()
21830    }
21831}
21832impl Default for OBSTACLE_DISTANCE_DATA {
21833    fn default() -> Self {
21834        Self::DEFAULT.clone()
21835    }
21836}
21837impl MessageData for OBSTACLE_DISTANCE_DATA {
21838    type Message = MavMessage;
21839    const ID: u32 = 330u32;
21840    const NAME: &'static str = "OBSTACLE_DISTANCE";
21841    const EXTRA_CRC: u8 = 23u8;
21842    const ENCODED_LEN: usize = 167usize;
21843    fn deser(
21844        _version: MavlinkVersion,
21845        __input: &[u8],
21846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21847        let avail_len = __input.len();
21848        let mut payload_buf = [0; Self::ENCODED_LEN];
21849        let mut buf = if avail_len < Self::ENCODED_LEN {
21850            payload_buf[0..avail_len].copy_from_slice(__input);
21851            Bytes::new(&payload_buf)
21852        } else {
21853            Bytes::new(__input)
21854        };
21855        let mut __struct = Self::default();
21856        __struct.time_usec = buf.get_u64_le();
21857        for v in &mut __struct.distances {
21858            let val = buf.get_u16_le();
21859            *v = val;
21860        }
21861        __struct.min_distance = buf.get_u16_le();
21862        __struct.max_distance = buf.get_u16_le();
21863        let tmp = buf.get_u8();
21864        __struct.sensor_type =
21865            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21866                enum_type: "MavDistanceSensor",
21867                value: tmp as u64,
21868            })?;
21869        __struct.increment = buf.get_u8();
21870        __struct.increment_f = buf.get_f32_le();
21871        __struct.angle_offset = buf.get_f32_le();
21872        let tmp = buf.get_u8();
21873        __struct.frame =
21874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21875                enum_type: "MavFrame",
21876                value: tmp as u64,
21877            })?;
21878        Ok(__struct)
21879    }
21880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21881        let mut __tmp = BytesMut::new(bytes);
21882        #[allow(clippy::absurd_extreme_comparisons)]
21883        #[allow(unused_comparisons)]
21884        if __tmp.remaining() < Self::ENCODED_LEN {
21885            panic!(
21886                "buffer is too small (need {} bytes, but got {})",
21887                Self::ENCODED_LEN,
21888                __tmp.remaining(),
21889            )
21890        }
21891        __tmp.put_u64_le(self.time_usec);
21892        for val in &self.distances {
21893            __tmp.put_u16_le(*val);
21894        }
21895        __tmp.put_u16_le(self.min_distance);
21896        __tmp.put_u16_le(self.max_distance);
21897        __tmp.put_u8(self.sensor_type as u8);
21898        __tmp.put_u8(self.increment);
21899        if matches!(version, MavlinkVersion::V2) {
21900            __tmp.put_f32_le(self.increment_f);
21901            __tmp.put_f32_le(self.angle_offset);
21902            __tmp.put_u8(self.frame as u8);
21903            let len = __tmp.len();
21904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21905        } else {
21906            __tmp.len()
21907        }
21908    }
21909}
21910#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21911#[doc = ""]
21912#[doc = "ID: 331"]
21913#[derive(Debug, Clone, PartialEq)]
21914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21916#[cfg_attr(feature = "ts", derive(TS))]
21917#[cfg_attr(feature = "ts", ts(export))]
21918pub struct ODOMETRY_DATA {
21919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21920    pub time_usec: u64,
21921    #[doc = "X Position"]
21922    pub x: f32,
21923    #[doc = "Y Position"]
21924    pub y: f32,
21925    #[doc = "Z Position"]
21926    pub z: f32,
21927    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21930    pub q: [f32; 4],
21931    #[doc = "X linear speed"]
21932    pub vx: f32,
21933    #[doc = "Y linear speed"]
21934    pub vy: f32,
21935    #[doc = "Z linear speed"]
21936    pub vz: f32,
21937    #[doc = "Roll angular speed"]
21938    pub rollspeed: f32,
21939    #[doc = "Pitch angular speed"]
21940    pub pitchspeed: f32,
21941    #[doc = "Yaw angular speed"]
21942    pub yawspeed: f32,
21943    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21945    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21946    pub pose_covariance: [f32; 21],
21947    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21950    pub velocity_covariance: [f32; 21],
21951    #[doc = "Coordinate frame of reference for the pose data."]
21952    pub frame_id: MavFrame,
21953    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21954    pub child_frame_id: MavFrame,
21955    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21957    pub reset_counter: u8,
21958    #[doc = "Type of estimator that is providing the odometry."]
21959    #[cfg_attr(feature = "serde", serde(default))]
21960    pub estimator_type: MavEstimatorType,
21961    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21963    pub quality: i8,
21964}
21965impl ODOMETRY_DATA {
21966    pub const ENCODED_LEN: usize = 233usize;
21967    pub const DEFAULT: Self = Self {
21968        time_usec: 0_u64,
21969        x: 0.0_f32,
21970        y: 0.0_f32,
21971        z: 0.0_f32,
21972        q: [0.0_f32; 4usize],
21973        vx: 0.0_f32,
21974        vy: 0.0_f32,
21975        vz: 0.0_f32,
21976        rollspeed: 0.0_f32,
21977        pitchspeed: 0.0_f32,
21978        yawspeed: 0.0_f32,
21979        pose_covariance: [0.0_f32; 21usize],
21980        velocity_covariance: [0.0_f32; 21usize],
21981        frame_id: MavFrame::DEFAULT,
21982        child_frame_id: MavFrame::DEFAULT,
21983        reset_counter: 0_u8,
21984        estimator_type: MavEstimatorType::DEFAULT,
21985        quality: 0_i8,
21986    };
21987    #[cfg(feature = "arbitrary")]
21988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21989        use arbitrary::{Arbitrary, Unstructured};
21990        let mut buf = [0u8; 1024];
21991        rng.fill_bytes(&mut buf);
21992        let mut unstructured = Unstructured::new(&buf);
21993        Self::arbitrary(&mut unstructured).unwrap_or_default()
21994    }
21995}
21996impl Default for ODOMETRY_DATA {
21997    fn default() -> Self {
21998        Self::DEFAULT.clone()
21999    }
22000}
22001impl MessageData for ODOMETRY_DATA {
22002    type Message = MavMessage;
22003    const ID: u32 = 331u32;
22004    const NAME: &'static str = "ODOMETRY";
22005    const EXTRA_CRC: u8 = 91u8;
22006    const ENCODED_LEN: usize = 233usize;
22007    fn deser(
22008        _version: MavlinkVersion,
22009        __input: &[u8],
22010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22011        let avail_len = __input.len();
22012        let mut payload_buf = [0; Self::ENCODED_LEN];
22013        let mut buf = if avail_len < Self::ENCODED_LEN {
22014            payload_buf[0..avail_len].copy_from_slice(__input);
22015            Bytes::new(&payload_buf)
22016        } else {
22017            Bytes::new(__input)
22018        };
22019        let mut __struct = Self::default();
22020        __struct.time_usec = buf.get_u64_le();
22021        __struct.x = buf.get_f32_le();
22022        __struct.y = buf.get_f32_le();
22023        __struct.z = buf.get_f32_le();
22024        for v in &mut __struct.q {
22025            let val = buf.get_f32_le();
22026            *v = val;
22027        }
22028        __struct.vx = buf.get_f32_le();
22029        __struct.vy = buf.get_f32_le();
22030        __struct.vz = buf.get_f32_le();
22031        __struct.rollspeed = buf.get_f32_le();
22032        __struct.pitchspeed = buf.get_f32_le();
22033        __struct.yawspeed = buf.get_f32_le();
22034        for v in &mut __struct.pose_covariance {
22035            let val = buf.get_f32_le();
22036            *v = val;
22037        }
22038        for v in &mut __struct.velocity_covariance {
22039            let val = buf.get_f32_le();
22040            *v = val;
22041        }
22042        let tmp = buf.get_u8();
22043        __struct.frame_id =
22044            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22045                enum_type: "MavFrame",
22046                value: tmp as u64,
22047            })?;
22048        let tmp = buf.get_u8();
22049        __struct.child_frame_id =
22050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22051                enum_type: "MavFrame",
22052                value: tmp as u64,
22053            })?;
22054        __struct.reset_counter = buf.get_u8();
22055        let tmp = buf.get_u8();
22056        __struct.estimator_type =
22057            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22058                enum_type: "MavEstimatorType",
22059                value: tmp as u64,
22060            })?;
22061        __struct.quality = buf.get_i8();
22062        Ok(__struct)
22063    }
22064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22065        let mut __tmp = BytesMut::new(bytes);
22066        #[allow(clippy::absurd_extreme_comparisons)]
22067        #[allow(unused_comparisons)]
22068        if __tmp.remaining() < Self::ENCODED_LEN {
22069            panic!(
22070                "buffer is too small (need {} bytes, but got {})",
22071                Self::ENCODED_LEN,
22072                __tmp.remaining(),
22073            )
22074        }
22075        __tmp.put_u64_le(self.time_usec);
22076        __tmp.put_f32_le(self.x);
22077        __tmp.put_f32_le(self.y);
22078        __tmp.put_f32_le(self.z);
22079        for val in &self.q {
22080            __tmp.put_f32_le(*val);
22081        }
22082        __tmp.put_f32_le(self.vx);
22083        __tmp.put_f32_le(self.vy);
22084        __tmp.put_f32_le(self.vz);
22085        __tmp.put_f32_le(self.rollspeed);
22086        __tmp.put_f32_le(self.pitchspeed);
22087        __tmp.put_f32_le(self.yawspeed);
22088        for val in &self.pose_covariance {
22089            __tmp.put_f32_le(*val);
22090        }
22091        for val in &self.velocity_covariance {
22092            __tmp.put_f32_le(*val);
22093        }
22094        __tmp.put_u8(self.frame_id as u8);
22095        __tmp.put_u8(self.child_frame_id as u8);
22096        if matches!(version, MavlinkVersion::V2) {
22097            __tmp.put_u8(self.reset_counter);
22098            __tmp.put_u8(self.estimator_type as u8);
22099            __tmp.put_i8(self.quality);
22100            let len = __tmp.len();
22101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22102        } else {
22103            __tmp.len()
22104        }
22105    }
22106}
22107#[doc = "Hardware status sent by an onboard computer."]
22108#[doc = ""]
22109#[doc = "ID: 390"]
22110#[derive(Debug, Clone, PartialEq)]
22111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22113#[cfg_attr(feature = "ts", derive(TS))]
22114#[cfg_attr(feature = "ts", ts(export))]
22115pub struct ONBOARD_COMPUTER_STATUS_DATA {
22116    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22117    pub time_usec: u64,
22118    #[doc = "Time since system boot."]
22119    pub uptime: u32,
22120    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22121    pub ram_usage: u32,
22122    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22123    pub ram_total: u32,
22124    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22127    pub storage_type: [u32; 4],
22128    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22131    pub storage_usage: [u32; 4],
22132    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22135    pub storage_total: [u32; 4],
22136    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22139    pub link_type: [u32; 6],
22140    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22143    pub link_tx_rate: [u32; 6],
22144    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22147    pub link_rx_rate: [u32; 6],
22148    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22151    pub link_tx_max: [u32; 6],
22152    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22153    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22154    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22155    pub link_rx_max: [u32; 6],
22156    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22159    pub fan_speed: [i16; 4],
22160    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22161    pub mavtype: u8,
22162    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22163    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22164    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22165    pub cpu_cores: [u8; 8],
22166    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22167    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22168    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22169    pub cpu_combined: [u8; 10],
22170    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22171    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22172    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22173    pub gpu_cores: [u8; 4],
22174    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22176    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22177    pub gpu_combined: [u8; 10],
22178    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22179    pub temperature_board: i8,
22180    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22183    pub temperature_core: [i8; 8],
22184}
22185impl ONBOARD_COMPUTER_STATUS_DATA {
22186    pub const ENCODED_LEN: usize = 238usize;
22187    pub const DEFAULT: Self = Self {
22188        time_usec: 0_u64,
22189        uptime: 0_u32,
22190        ram_usage: 0_u32,
22191        ram_total: 0_u32,
22192        storage_type: [0_u32; 4usize],
22193        storage_usage: [0_u32; 4usize],
22194        storage_total: [0_u32; 4usize],
22195        link_type: [0_u32; 6usize],
22196        link_tx_rate: [0_u32; 6usize],
22197        link_rx_rate: [0_u32; 6usize],
22198        link_tx_max: [0_u32; 6usize],
22199        link_rx_max: [0_u32; 6usize],
22200        fan_speed: [0_i16; 4usize],
22201        mavtype: 0_u8,
22202        cpu_cores: [0_u8; 8usize],
22203        cpu_combined: [0_u8; 10usize],
22204        gpu_cores: [0_u8; 4usize],
22205        gpu_combined: [0_u8; 10usize],
22206        temperature_board: 0_i8,
22207        temperature_core: [0_i8; 8usize],
22208    };
22209    #[cfg(feature = "arbitrary")]
22210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22211        use arbitrary::{Arbitrary, Unstructured};
22212        let mut buf = [0u8; 1024];
22213        rng.fill_bytes(&mut buf);
22214        let mut unstructured = Unstructured::new(&buf);
22215        Self::arbitrary(&mut unstructured).unwrap_or_default()
22216    }
22217}
22218impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22219    fn default() -> Self {
22220        Self::DEFAULT.clone()
22221    }
22222}
22223impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22224    type Message = MavMessage;
22225    const ID: u32 = 390u32;
22226    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22227    const EXTRA_CRC: u8 = 156u8;
22228    const ENCODED_LEN: usize = 238usize;
22229    fn deser(
22230        _version: MavlinkVersion,
22231        __input: &[u8],
22232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22233        let avail_len = __input.len();
22234        let mut payload_buf = [0; Self::ENCODED_LEN];
22235        let mut buf = if avail_len < Self::ENCODED_LEN {
22236            payload_buf[0..avail_len].copy_from_slice(__input);
22237            Bytes::new(&payload_buf)
22238        } else {
22239            Bytes::new(__input)
22240        };
22241        let mut __struct = Self::default();
22242        __struct.time_usec = buf.get_u64_le();
22243        __struct.uptime = buf.get_u32_le();
22244        __struct.ram_usage = buf.get_u32_le();
22245        __struct.ram_total = buf.get_u32_le();
22246        for v in &mut __struct.storage_type {
22247            let val = buf.get_u32_le();
22248            *v = val;
22249        }
22250        for v in &mut __struct.storage_usage {
22251            let val = buf.get_u32_le();
22252            *v = val;
22253        }
22254        for v in &mut __struct.storage_total {
22255            let val = buf.get_u32_le();
22256            *v = val;
22257        }
22258        for v in &mut __struct.link_type {
22259            let val = buf.get_u32_le();
22260            *v = val;
22261        }
22262        for v in &mut __struct.link_tx_rate {
22263            let val = buf.get_u32_le();
22264            *v = val;
22265        }
22266        for v in &mut __struct.link_rx_rate {
22267            let val = buf.get_u32_le();
22268            *v = val;
22269        }
22270        for v in &mut __struct.link_tx_max {
22271            let val = buf.get_u32_le();
22272            *v = val;
22273        }
22274        for v in &mut __struct.link_rx_max {
22275            let val = buf.get_u32_le();
22276            *v = val;
22277        }
22278        for v in &mut __struct.fan_speed {
22279            let val = buf.get_i16_le();
22280            *v = val;
22281        }
22282        __struct.mavtype = buf.get_u8();
22283        for v in &mut __struct.cpu_cores {
22284            let val = buf.get_u8();
22285            *v = val;
22286        }
22287        for v in &mut __struct.cpu_combined {
22288            let val = buf.get_u8();
22289            *v = val;
22290        }
22291        for v in &mut __struct.gpu_cores {
22292            let val = buf.get_u8();
22293            *v = val;
22294        }
22295        for v in &mut __struct.gpu_combined {
22296            let val = buf.get_u8();
22297            *v = val;
22298        }
22299        __struct.temperature_board = buf.get_i8();
22300        for v in &mut __struct.temperature_core {
22301            let val = buf.get_i8();
22302            *v = val;
22303        }
22304        Ok(__struct)
22305    }
22306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22307        let mut __tmp = BytesMut::new(bytes);
22308        #[allow(clippy::absurd_extreme_comparisons)]
22309        #[allow(unused_comparisons)]
22310        if __tmp.remaining() < Self::ENCODED_LEN {
22311            panic!(
22312                "buffer is too small (need {} bytes, but got {})",
22313                Self::ENCODED_LEN,
22314                __tmp.remaining(),
22315            )
22316        }
22317        __tmp.put_u64_le(self.time_usec);
22318        __tmp.put_u32_le(self.uptime);
22319        __tmp.put_u32_le(self.ram_usage);
22320        __tmp.put_u32_le(self.ram_total);
22321        for val in &self.storage_type {
22322            __tmp.put_u32_le(*val);
22323        }
22324        for val in &self.storage_usage {
22325            __tmp.put_u32_le(*val);
22326        }
22327        for val in &self.storage_total {
22328            __tmp.put_u32_le(*val);
22329        }
22330        for val in &self.link_type {
22331            __tmp.put_u32_le(*val);
22332        }
22333        for val in &self.link_tx_rate {
22334            __tmp.put_u32_le(*val);
22335        }
22336        for val in &self.link_rx_rate {
22337            __tmp.put_u32_le(*val);
22338        }
22339        for val in &self.link_tx_max {
22340            __tmp.put_u32_le(*val);
22341        }
22342        for val in &self.link_rx_max {
22343            __tmp.put_u32_le(*val);
22344        }
22345        for val in &self.fan_speed {
22346            __tmp.put_i16_le(*val);
22347        }
22348        __tmp.put_u8(self.mavtype);
22349        for val in &self.cpu_cores {
22350            __tmp.put_u8(*val);
22351        }
22352        for val in &self.cpu_combined {
22353            __tmp.put_u8(*val);
22354        }
22355        for val in &self.gpu_cores {
22356            __tmp.put_u8(*val);
22357        }
22358        for val in &self.gpu_combined {
22359            __tmp.put_u8(*val);
22360        }
22361        __tmp.put_i8(self.temperature_board);
22362        for val in &self.temperature_core {
22363            __tmp.put_i8(*val);
22364        }
22365        if matches!(version, MavlinkVersion::V2) {
22366            let len = __tmp.len();
22367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22368        } else {
22369            __tmp.len()
22370        }
22371    }
22372}
22373#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22374#[doc = ""]
22375#[doc = "ID: 12918"]
22376#[derive(Debug, Clone, PartialEq)]
22377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22379#[cfg_attr(feature = "ts", derive(TS))]
22380#[cfg_attr(feature = "ts", ts(export))]
22381pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22382    #[doc = "Status level indicating if arming is allowed."]
22383    pub status: MavOdidArmStatus,
22384    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22385    #[cfg_attr(feature = "ts", ts(type = "string"))]
22386    pub error: CharArray<50>,
22387}
22388impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22389    pub const ENCODED_LEN: usize = 51usize;
22390    pub const DEFAULT: Self = Self {
22391        status: MavOdidArmStatus::DEFAULT,
22392        error: CharArray::new([0_u8; 50usize]),
22393    };
22394    #[cfg(feature = "arbitrary")]
22395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22396        use arbitrary::{Arbitrary, Unstructured};
22397        let mut buf = [0u8; 1024];
22398        rng.fill_bytes(&mut buf);
22399        let mut unstructured = Unstructured::new(&buf);
22400        Self::arbitrary(&mut unstructured).unwrap_or_default()
22401    }
22402}
22403impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22404    fn default() -> Self {
22405        Self::DEFAULT.clone()
22406    }
22407}
22408impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22409    type Message = MavMessage;
22410    const ID: u32 = 12918u32;
22411    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22412    const EXTRA_CRC: u8 = 139u8;
22413    const ENCODED_LEN: usize = 51usize;
22414    fn deser(
22415        _version: MavlinkVersion,
22416        __input: &[u8],
22417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22418        let avail_len = __input.len();
22419        let mut payload_buf = [0; Self::ENCODED_LEN];
22420        let mut buf = if avail_len < Self::ENCODED_LEN {
22421            payload_buf[0..avail_len].copy_from_slice(__input);
22422            Bytes::new(&payload_buf)
22423        } else {
22424            Bytes::new(__input)
22425        };
22426        let mut __struct = Self::default();
22427        let tmp = buf.get_u8();
22428        __struct.status =
22429            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22430                enum_type: "MavOdidArmStatus",
22431                value: tmp as u64,
22432            })?;
22433        let mut tmp = [0_u8; 50usize];
22434        for v in &mut tmp {
22435            *v = buf.get_u8();
22436        }
22437        __struct.error = CharArray::new(tmp);
22438        Ok(__struct)
22439    }
22440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22441        let mut __tmp = BytesMut::new(bytes);
22442        #[allow(clippy::absurd_extreme_comparisons)]
22443        #[allow(unused_comparisons)]
22444        if __tmp.remaining() < Self::ENCODED_LEN {
22445            panic!(
22446                "buffer is too small (need {} bytes, but got {})",
22447                Self::ENCODED_LEN,
22448                __tmp.remaining(),
22449            )
22450        }
22451        __tmp.put_u8(self.status as u8);
22452        for val in &self.error {
22453            __tmp.put_u8(*val);
22454        }
22455        if matches!(version, MavlinkVersion::V2) {
22456            let len = __tmp.len();
22457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22458        } else {
22459            __tmp.len()
22460        }
22461    }
22462}
22463#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22464#[doc = ""]
22465#[doc = "ID: 12902"]
22466#[derive(Debug, Clone, PartialEq)]
22467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22469#[cfg_attr(feature = "ts", derive(TS))]
22470#[cfg_attr(feature = "ts", ts(export))]
22471pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22472    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22473    pub timestamp: u32,
22474    #[doc = "System ID (0 for broadcast)."]
22475    pub target_system: u8,
22476    #[doc = "Component ID (0 for broadcast)."]
22477    pub target_component: u8,
22478    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22481    pub id_or_mac: [u8; 20],
22482    #[doc = "Indicates the type of authentication."]
22483    pub authentication_type: MavOdidAuthType,
22484    #[doc = "Allowed range is 0 - 15."]
22485    pub data_page: u8,
22486    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22487    pub last_page_index: u8,
22488    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22489    pub length: u8,
22490    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22493    pub authentication_data: [u8; 23],
22494}
22495impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22496    pub const ENCODED_LEN: usize = 53usize;
22497    pub const DEFAULT: Self = Self {
22498        timestamp: 0_u32,
22499        target_system: 0_u8,
22500        target_component: 0_u8,
22501        id_or_mac: [0_u8; 20usize],
22502        authentication_type: MavOdidAuthType::DEFAULT,
22503        data_page: 0_u8,
22504        last_page_index: 0_u8,
22505        length: 0_u8,
22506        authentication_data: [0_u8; 23usize],
22507    };
22508    #[cfg(feature = "arbitrary")]
22509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22510        use arbitrary::{Arbitrary, Unstructured};
22511        let mut buf = [0u8; 1024];
22512        rng.fill_bytes(&mut buf);
22513        let mut unstructured = Unstructured::new(&buf);
22514        Self::arbitrary(&mut unstructured).unwrap_or_default()
22515    }
22516}
22517impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22518    fn default() -> Self {
22519        Self::DEFAULT.clone()
22520    }
22521}
22522impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22523    type Message = MavMessage;
22524    const ID: u32 = 12902u32;
22525    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22526    const EXTRA_CRC: u8 = 140u8;
22527    const ENCODED_LEN: usize = 53usize;
22528    fn deser(
22529        _version: MavlinkVersion,
22530        __input: &[u8],
22531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22532        let avail_len = __input.len();
22533        let mut payload_buf = [0; Self::ENCODED_LEN];
22534        let mut buf = if avail_len < Self::ENCODED_LEN {
22535            payload_buf[0..avail_len].copy_from_slice(__input);
22536            Bytes::new(&payload_buf)
22537        } else {
22538            Bytes::new(__input)
22539        };
22540        let mut __struct = Self::default();
22541        __struct.timestamp = buf.get_u32_le();
22542        __struct.target_system = buf.get_u8();
22543        __struct.target_component = buf.get_u8();
22544        for v in &mut __struct.id_or_mac {
22545            let val = buf.get_u8();
22546            *v = val;
22547        }
22548        let tmp = buf.get_u8();
22549        __struct.authentication_type =
22550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22551                enum_type: "MavOdidAuthType",
22552                value: tmp as u64,
22553            })?;
22554        __struct.data_page = buf.get_u8();
22555        __struct.last_page_index = buf.get_u8();
22556        __struct.length = buf.get_u8();
22557        for v in &mut __struct.authentication_data {
22558            let val = buf.get_u8();
22559            *v = val;
22560        }
22561        Ok(__struct)
22562    }
22563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22564        let mut __tmp = BytesMut::new(bytes);
22565        #[allow(clippy::absurd_extreme_comparisons)]
22566        #[allow(unused_comparisons)]
22567        if __tmp.remaining() < Self::ENCODED_LEN {
22568            panic!(
22569                "buffer is too small (need {} bytes, but got {})",
22570                Self::ENCODED_LEN,
22571                __tmp.remaining(),
22572            )
22573        }
22574        __tmp.put_u32_le(self.timestamp);
22575        __tmp.put_u8(self.target_system);
22576        __tmp.put_u8(self.target_component);
22577        for val in &self.id_or_mac {
22578            __tmp.put_u8(*val);
22579        }
22580        __tmp.put_u8(self.authentication_type as u8);
22581        __tmp.put_u8(self.data_page);
22582        __tmp.put_u8(self.last_page_index);
22583        __tmp.put_u8(self.length);
22584        for val in &self.authentication_data {
22585            __tmp.put_u8(*val);
22586        }
22587        if matches!(version, MavlinkVersion::V2) {
22588            let len = __tmp.len();
22589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22590        } else {
22591            __tmp.len()
22592        }
22593    }
22594}
22595#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22596#[doc = ""]
22597#[doc = "ID: 12900"]
22598#[derive(Debug, Clone, PartialEq)]
22599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22601#[cfg_attr(feature = "ts", derive(TS))]
22602#[cfg_attr(feature = "ts", ts(export))]
22603pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22604    #[doc = "System ID (0 for broadcast)."]
22605    pub target_system: u8,
22606    #[doc = "Component ID (0 for broadcast)."]
22607    pub target_component: u8,
22608    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22609    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22610    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22611    pub id_or_mac: [u8; 20],
22612    #[doc = "Indicates the format for the uas_id field of this message."]
22613    pub id_type: MavOdidIdType,
22614    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22615    pub ua_type: MavOdidUaType,
22616    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22619    pub uas_id: [u8; 20],
22620}
22621impl OPEN_DRONE_ID_BASIC_ID_DATA {
22622    pub const ENCODED_LEN: usize = 44usize;
22623    pub const DEFAULT: Self = Self {
22624        target_system: 0_u8,
22625        target_component: 0_u8,
22626        id_or_mac: [0_u8; 20usize],
22627        id_type: MavOdidIdType::DEFAULT,
22628        ua_type: MavOdidUaType::DEFAULT,
22629        uas_id: [0_u8; 20usize],
22630    };
22631    #[cfg(feature = "arbitrary")]
22632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22633        use arbitrary::{Arbitrary, Unstructured};
22634        let mut buf = [0u8; 1024];
22635        rng.fill_bytes(&mut buf);
22636        let mut unstructured = Unstructured::new(&buf);
22637        Self::arbitrary(&mut unstructured).unwrap_or_default()
22638    }
22639}
22640impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22641    fn default() -> Self {
22642        Self::DEFAULT.clone()
22643    }
22644}
22645impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22646    type Message = MavMessage;
22647    const ID: u32 = 12900u32;
22648    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22649    const EXTRA_CRC: u8 = 114u8;
22650    const ENCODED_LEN: usize = 44usize;
22651    fn deser(
22652        _version: MavlinkVersion,
22653        __input: &[u8],
22654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22655        let avail_len = __input.len();
22656        let mut payload_buf = [0; Self::ENCODED_LEN];
22657        let mut buf = if avail_len < Self::ENCODED_LEN {
22658            payload_buf[0..avail_len].copy_from_slice(__input);
22659            Bytes::new(&payload_buf)
22660        } else {
22661            Bytes::new(__input)
22662        };
22663        let mut __struct = Self::default();
22664        __struct.target_system = buf.get_u8();
22665        __struct.target_component = buf.get_u8();
22666        for v in &mut __struct.id_or_mac {
22667            let val = buf.get_u8();
22668            *v = val;
22669        }
22670        let tmp = buf.get_u8();
22671        __struct.id_type =
22672            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22673                enum_type: "MavOdidIdType",
22674                value: tmp as u64,
22675            })?;
22676        let tmp = buf.get_u8();
22677        __struct.ua_type =
22678            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22679                enum_type: "MavOdidUaType",
22680                value: tmp as u64,
22681            })?;
22682        for v in &mut __struct.uas_id {
22683            let val = buf.get_u8();
22684            *v = val;
22685        }
22686        Ok(__struct)
22687    }
22688    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22689        let mut __tmp = BytesMut::new(bytes);
22690        #[allow(clippy::absurd_extreme_comparisons)]
22691        #[allow(unused_comparisons)]
22692        if __tmp.remaining() < Self::ENCODED_LEN {
22693            panic!(
22694                "buffer is too small (need {} bytes, but got {})",
22695                Self::ENCODED_LEN,
22696                __tmp.remaining(),
22697            )
22698        }
22699        __tmp.put_u8(self.target_system);
22700        __tmp.put_u8(self.target_component);
22701        for val in &self.id_or_mac {
22702            __tmp.put_u8(*val);
22703        }
22704        __tmp.put_u8(self.id_type as u8);
22705        __tmp.put_u8(self.ua_type as u8);
22706        for val in &self.uas_id {
22707            __tmp.put_u8(*val);
22708        }
22709        if matches!(version, MavlinkVersion::V2) {
22710            let len = __tmp.len();
22711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22712        } else {
22713            __tmp.len()
22714        }
22715    }
22716}
22717#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22718#[doc = ""]
22719#[doc = "ID: 12901"]
22720#[derive(Debug, Clone, PartialEq)]
22721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22723#[cfg_attr(feature = "ts", derive(TS))]
22724#[cfg_attr(feature = "ts", ts(export))]
22725pub struct OPEN_DRONE_ID_LOCATION_DATA {
22726    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22727    pub latitude: i32,
22728    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22729    pub longitude: i32,
22730    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22731    pub altitude_barometric: f32,
22732    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22733    pub altitude_geodetic: f32,
22734    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22735    pub height: f32,
22736    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22737    pub timestamp: f32,
22738    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22739    pub direction: u16,
22740    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22741    pub speed_horizontal: u16,
22742    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22743    pub speed_vertical: i16,
22744    #[doc = "System ID (0 for broadcast)."]
22745    pub target_system: u8,
22746    #[doc = "Component ID (0 for broadcast)."]
22747    pub target_component: u8,
22748    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22749    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22750    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22751    pub id_or_mac: [u8; 20],
22752    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22753    pub status: MavOdidStatus,
22754    #[doc = "Indicates the reference point for the height field."]
22755    pub height_reference: MavOdidHeightRef,
22756    #[doc = "The accuracy of the horizontal position."]
22757    pub horizontal_accuracy: MavOdidHorAcc,
22758    #[doc = "The accuracy of the vertical position."]
22759    pub vertical_accuracy: MavOdidVerAcc,
22760    #[doc = "The accuracy of the barometric altitude."]
22761    pub barometer_accuracy: MavOdidVerAcc,
22762    #[doc = "The accuracy of the horizontal and vertical speed."]
22763    pub speed_accuracy: MavOdidSpeedAcc,
22764    #[doc = "The accuracy of the timestamps."]
22765    pub timestamp_accuracy: MavOdidTimeAcc,
22766}
22767impl OPEN_DRONE_ID_LOCATION_DATA {
22768    pub const ENCODED_LEN: usize = 59usize;
22769    pub const DEFAULT: Self = Self {
22770        latitude: 0_i32,
22771        longitude: 0_i32,
22772        altitude_barometric: 0.0_f32,
22773        altitude_geodetic: 0.0_f32,
22774        height: 0.0_f32,
22775        timestamp: 0.0_f32,
22776        direction: 0_u16,
22777        speed_horizontal: 0_u16,
22778        speed_vertical: 0_i16,
22779        target_system: 0_u8,
22780        target_component: 0_u8,
22781        id_or_mac: [0_u8; 20usize],
22782        status: MavOdidStatus::DEFAULT,
22783        height_reference: MavOdidHeightRef::DEFAULT,
22784        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22785        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22786        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22787        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22788        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22789    };
22790    #[cfg(feature = "arbitrary")]
22791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22792        use arbitrary::{Arbitrary, Unstructured};
22793        let mut buf = [0u8; 1024];
22794        rng.fill_bytes(&mut buf);
22795        let mut unstructured = Unstructured::new(&buf);
22796        Self::arbitrary(&mut unstructured).unwrap_or_default()
22797    }
22798}
22799impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22800    fn default() -> Self {
22801        Self::DEFAULT.clone()
22802    }
22803}
22804impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22805    type Message = MavMessage;
22806    const ID: u32 = 12901u32;
22807    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22808    const EXTRA_CRC: u8 = 254u8;
22809    const ENCODED_LEN: usize = 59usize;
22810    fn deser(
22811        _version: MavlinkVersion,
22812        __input: &[u8],
22813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22814        let avail_len = __input.len();
22815        let mut payload_buf = [0; Self::ENCODED_LEN];
22816        let mut buf = if avail_len < Self::ENCODED_LEN {
22817            payload_buf[0..avail_len].copy_from_slice(__input);
22818            Bytes::new(&payload_buf)
22819        } else {
22820            Bytes::new(__input)
22821        };
22822        let mut __struct = Self::default();
22823        __struct.latitude = buf.get_i32_le();
22824        __struct.longitude = buf.get_i32_le();
22825        __struct.altitude_barometric = buf.get_f32_le();
22826        __struct.altitude_geodetic = buf.get_f32_le();
22827        __struct.height = buf.get_f32_le();
22828        __struct.timestamp = buf.get_f32_le();
22829        __struct.direction = buf.get_u16_le();
22830        __struct.speed_horizontal = buf.get_u16_le();
22831        __struct.speed_vertical = buf.get_i16_le();
22832        __struct.target_system = buf.get_u8();
22833        __struct.target_component = buf.get_u8();
22834        for v in &mut __struct.id_or_mac {
22835            let val = buf.get_u8();
22836            *v = val;
22837        }
22838        let tmp = buf.get_u8();
22839        __struct.status =
22840            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22841                enum_type: "MavOdidStatus",
22842                value: tmp as u64,
22843            })?;
22844        let tmp = buf.get_u8();
22845        __struct.height_reference =
22846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22847                enum_type: "MavOdidHeightRef",
22848                value: tmp as u64,
22849            })?;
22850        let tmp = buf.get_u8();
22851        __struct.horizontal_accuracy =
22852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22853                enum_type: "MavOdidHorAcc",
22854                value: tmp as u64,
22855            })?;
22856        let tmp = buf.get_u8();
22857        __struct.vertical_accuracy =
22858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22859                enum_type: "MavOdidVerAcc",
22860                value: tmp as u64,
22861            })?;
22862        let tmp = buf.get_u8();
22863        __struct.barometer_accuracy =
22864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22865                enum_type: "MavOdidVerAcc",
22866                value: tmp as u64,
22867            })?;
22868        let tmp = buf.get_u8();
22869        __struct.speed_accuracy =
22870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22871                enum_type: "MavOdidSpeedAcc",
22872                value: tmp as u64,
22873            })?;
22874        let tmp = buf.get_u8();
22875        __struct.timestamp_accuracy =
22876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22877                enum_type: "MavOdidTimeAcc",
22878                value: tmp as u64,
22879            })?;
22880        Ok(__struct)
22881    }
22882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22883        let mut __tmp = BytesMut::new(bytes);
22884        #[allow(clippy::absurd_extreme_comparisons)]
22885        #[allow(unused_comparisons)]
22886        if __tmp.remaining() < Self::ENCODED_LEN {
22887            panic!(
22888                "buffer is too small (need {} bytes, but got {})",
22889                Self::ENCODED_LEN,
22890                __tmp.remaining(),
22891            )
22892        }
22893        __tmp.put_i32_le(self.latitude);
22894        __tmp.put_i32_le(self.longitude);
22895        __tmp.put_f32_le(self.altitude_barometric);
22896        __tmp.put_f32_le(self.altitude_geodetic);
22897        __tmp.put_f32_le(self.height);
22898        __tmp.put_f32_le(self.timestamp);
22899        __tmp.put_u16_le(self.direction);
22900        __tmp.put_u16_le(self.speed_horizontal);
22901        __tmp.put_i16_le(self.speed_vertical);
22902        __tmp.put_u8(self.target_system);
22903        __tmp.put_u8(self.target_component);
22904        for val in &self.id_or_mac {
22905            __tmp.put_u8(*val);
22906        }
22907        __tmp.put_u8(self.status as u8);
22908        __tmp.put_u8(self.height_reference as u8);
22909        __tmp.put_u8(self.horizontal_accuracy as u8);
22910        __tmp.put_u8(self.vertical_accuracy as u8);
22911        __tmp.put_u8(self.barometer_accuracy as u8);
22912        __tmp.put_u8(self.speed_accuracy as u8);
22913        __tmp.put_u8(self.timestamp_accuracy as u8);
22914        if matches!(version, MavlinkVersion::V2) {
22915            let len = __tmp.len();
22916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22917        } else {
22918            __tmp.len()
22919        }
22920    }
22921}
22922#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22923#[doc = ""]
22924#[doc = "ID: 12915"]
22925#[derive(Debug, Clone, PartialEq)]
22926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22928#[cfg_attr(feature = "ts", derive(TS))]
22929#[cfg_attr(feature = "ts", ts(export))]
22930pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22931    #[doc = "System ID (0 for broadcast)."]
22932    pub target_system: u8,
22933    #[doc = "Component ID (0 for broadcast)."]
22934    pub target_component: u8,
22935    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22938    pub id_or_mac: [u8; 20],
22939    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22940    pub single_message_size: u8,
22941    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22942    pub msg_pack_size: u8,
22943    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22945    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22946    pub messages: [u8; 225],
22947}
22948impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22949    pub const ENCODED_LEN: usize = 249usize;
22950    pub const DEFAULT: Self = Self {
22951        target_system: 0_u8,
22952        target_component: 0_u8,
22953        id_or_mac: [0_u8; 20usize],
22954        single_message_size: 0_u8,
22955        msg_pack_size: 0_u8,
22956        messages: [0_u8; 225usize],
22957    };
22958    #[cfg(feature = "arbitrary")]
22959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22960        use arbitrary::{Arbitrary, Unstructured};
22961        let mut buf = [0u8; 1024];
22962        rng.fill_bytes(&mut buf);
22963        let mut unstructured = Unstructured::new(&buf);
22964        Self::arbitrary(&mut unstructured).unwrap_or_default()
22965    }
22966}
22967impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22968    fn default() -> Self {
22969        Self::DEFAULT.clone()
22970    }
22971}
22972impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22973    type Message = MavMessage;
22974    const ID: u32 = 12915u32;
22975    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22976    const EXTRA_CRC: u8 = 94u8;
22977    const ENCODED_LEN: usize = 249usize;
22978    fn deser(
22979        _version: MavlinkVersion,
22980        __input: &[u8],
22981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22982        let avail_len = __input.len();
22983        let mut payload_buf = [0; Self::ENCODED_LEN];
22984        let mut buf = if avail_len < Self::ENCODED_LEN {
22985            payload_buf[0..avail_len].copy_from_slice(__input);
22986            Bytes::new(&payload_buf)
22987        } else {
22988            Bytes::new(__input)
22989        };
22990        let mut __struct = Self::default();
22991        __struct.target_system = buf.get_u8();
22992        __struct.target_component = buf.get_u8();
22993        for v in &mut __struct.id_or_mac {
22994            let val = buf.get_u8();
22995            *v = val;
22996        }
22997        __struct.single_message_size = buf.get_u8();
22998        __struct.msg_pack_size = buf.get_u8();
22999        for v in &mut __struct.messages {
23000            let val = buf.get_u8();
23001            *v = val;
23002        }
23003        Ok(__struct)
23004    }
23005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23006        let mut __tmp = BytesMut::new(bytes);
23007        #[allow(clippy::absurd_extreme_comparisons)]
23008        #[allow(unused_comparisons)]
23009        if __tmp.remaining() < Self::ENCODED_LEN {
23010            panic!(
23011                "buffer is too small (need {} bytes, but got {})",
23012                Self::ENCODED_LEN,
23013                __tmp.remaining(),
23014            )
23015        }
23016        __tmp.put_u8(self.target_system);
23017        __tmp.put_u8(self.target_component);
23018        for val in &self.id_or_mac {
23019            __tmp.put_u8(*val);
23020        }
23021        __tmp.put_u8(self.single_message_size);
23022        __tmp.put_u8(self.msg_pack_size);
23023        for val in &self.messages {
23024            __tmp.put_u8(*val);
23025        }
23026        if matches!(version, MavlinkVersion::V2) {
23027            let len = __tmp.len();
23028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23029        } else {
23030            __tmp.len()
23031        }
23032    }
23033}
23034#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23035#[doc = ""]
23036#[doc = "ID: 12905"]
23037#[derive(Debug, Clone, PartialEq)]
23038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23040#[cfg_attr(feature = "ts", derive(TS))]
23041#[cfg_attr(feature = "ts", ts(export))]
23042pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23043    #[doc = "System ID (0 for broadcast)."]
23044    pub target_system: u8,
23045    #[doc = "Component ID (0 for broadcast)."]
23046    pub target_component: u8,
23047    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23050    pub id_or_mac: [u8; 20],
23051    #[doc = "Indicates the type of the operator_id field."]
23052    pub operator_id_type: MavOdidOperatorIdType,
23053    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23054    #[cfg_attr(feature = "ts", ts(type = "string"))]
23055    pub operator_id: CharArray<20>,
23056}
23057impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23058    pub const ENCODED_LEN: usize = 43usize;
23059    pub const DEFAULT: Self = Self {
23060        target_system: 0_u8,
23061        target_component: 0_u8,
23062        id_or_mac: [0_u8; 20usize],
23063        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23064        operator_id: CharArray::new([0_u8; 20usize]),
23065    };
23066    #[cfg(feature = "arbitrary")]
23067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23068        use arbitrary::{Arbitrary, Unstructured};
23069        let mut buf = [0u8; 1024];
23070        rng.fill_bytes(&mut buf);
23071        let mut unstructured = Unstructured::new(&buf);
23072        Self::arbitrary(&mut unstructured).unwrap_or_default()
23073    }
23074}
23075impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23076    fn default() -> Self {
23077        Self::DEFAULT.clone()
23078    }
23079}
23080impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23081    type Message = MavMessage;
23082    const ID: u32 = 12905u32;
23083    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23084    const EXTRA_CRC: u8 = 49u8;
23085    const ENCODED_LEN: usize = 43usize;
23086    fn deser(
23087        _version: MavlinkVersion,
23088        __input: &[u8],
23089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23090        let avail_len = __input.len();
23091        let mut payload_buf = [0; Self::ENCODED_LEN];
23092        let mut buf = if avail_len < Self::ENCODED_LEN {
23093            payload_buf[0..avail_len].copy_from_slice(__input);
23094            Bytes::new(&payload_buf)
23095        } else {
23096            Bytes::new(__input)
23097        };
23098        let mut __struct = Self::default();
23099        __struct.target_system = buf.get_u8();
23100        __struct.target_component = buf.get_u8();
23101        for v in &mut __struct.id_or_mac {
23102            let val = buf.get_u8();
23103            *v = val;
23104        }
23105        let tmp = buf.get_u8();
23106        __struct.operator_id_type =
23107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23108                enum_type: "MavOdidOperatorIdType",
23109                value: tmp as u64,
23110            })?;
23111        let mut tmp = [0_u8; 20usize];
23112        for v in &mut tmp {
23113            *v = buf.get_u8();
23114        }
23115        __struct.operator_id = CharArray::new(tmp);
23116        Ok(__struct)
23117    }
23118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23119        let mut __tmp = BytesMut::new(bytes);
23120        #[allow(clippy::absurd_extreme_comparisons)]
23121        #[allow(unused_comparisons)]
23122        if __tmp.remaining() < Self::ENCODED_LEN {
23123            panic!(
23124                "buffer is too small (need {} bytes, but got {})",
23125                Self::ENCODED_LEN,
23126                __tmp.remaining(),
23127            )
23128        }
23129        __tmp.put_u8(self.target_system);
23130        __tmp.put_u8(self.target_component);
23131        for val in &self.id_or_mac {
23132            __tmp.put_u8(*val);
23133        }
23134        __tmp.put_u8(self.operator_id_type as u8);
23135        for val in &self.operator_id {
23136            __tmp.put_u8(*val);
23137        }
23138        if matches!(version, MavlinkVersion::V2) {
23139            let len = __tmp.len();
23140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23141        } else {
23142            __tmp.len()
23143        }
23144    }
23145}
23146#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23147#[doc = ""]
23148#[doc = "ID: 12903"]
23149#[derive(Debug, Clone, PartialEq)]
23150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23152#[cfg_attr(feature = "ts", derive(TS))]
23153#[cfg_attr(feature = "ts", ts(export))]
23154pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23155    #[doc = "System ID (0 for broadcast)."]
23156    pub target_system: u8,
23157    #[doc = "Component ID (0 for broadcast)."]
23158    pub target_component: u8,
23159    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23160    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23161    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23162    pub id_or_mac: [u8; 20],
23163    #[doc = "Indicates the type of the description field."]
23164    pub description_type: MavOdidDescType,
23165    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23166    #[cfg_attr(feature = "ts", ts(type = "string"))]
23167    pub description: CharArray<23>,
23168}
23169impl OPEN_DRONE_ID_SELF_ID_DATA {
23170    pub const ENCODED_LEN: usize = 46usize;
23171    pub const DEFAULT: Self = Self {
23172        target_system: 0_u8,
23173        target_component: 0_u8,
23174        id_or_mac: [0_u8; 20usize],
23175        description_type: MavOdidDescType::DEFAULT,
23176        description: CharArray::new([0_u8; 23usize]),
23177    };
23178    #[cfg(feature = "arbitrary")]
23179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23180        use arbitrary::{Arbitrary, Unstructured};
23181        let mut buf = [0u8; 1024];
23182        rng.fill_bytes(&mut buf);
23183        let mut unstructured = Unstructured::new(&buf);
23184        Self::arbitrary(&mut unstructured).unwrap_or_default()
23185    }
23186}
23187impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23188    fn default() -> Self {
23189        Self::DEFAULT.clone()
23190    }
23191}
23192impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23193    type Message = MavMessage;
23194    const ID: u32 = 12903u32;
23195    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23196    const EXTRA_CRC: u8 = 249u8;
23197    const ENCODED_LEN: usize = 46usize;
23198    fn deser(
23199        _version: MavlinkVersion,
23200        __input: &[u8],
23201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23202        let avail_len = __input.len();
23203        let mut payload_buf = [0; Self::ENCODED_LEN];
23204        let mut buf = if avail_len < Self::ENCODED_LEN {
23205            payload_buf[0..avail_len].copy_from_slice(__input);
23206            Bytes::new(&payload_buf)
23207        } else {
23208            Bytes::new(__input)
23209        };
23210        let mut __struct = Self::default();
23211        __struct.target_system = buf.get_u8();
23212        __struct.target_component = buf.get_u8();
23213        for v in &mut __struct.id_or_mac {
23214            let val = buf.get_u8();
23215            *v = val;
23216        }
23217        let tmp = buf.get_u8();
23218        __struct.description_type =
23219            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23220                enum_type: "MavOdidDescType",
23221                value: tmp as u64,
23222            })?;
23223        let mut tmp = [0_u8; 23usize];
23224        for v in &mut tmp {
23225            *v = buf.get_u8();
23226        }
23227        __struct.description = CharArray::new(tmp);
23228        Ok(__struct)
23229    }
23230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23231        let mut __tmp = BytesMut::new(bytes);
23232        #[allow(clippy::absurd_extreme_comparisons)]
23233        #[allow(unused_comparisons)]
23234        if __tmp.remaining() < Self::ENCODED_LEN {
23235            panic!(
23236                "buffer is too small (need {} bytes, but got {})",
23237                Self::ENCODED_LEN,
23238                __tmp.remaining(),
23239            )
23240        }
23241        __tmp.put_u8(self.target_system);
23242        __tmp.put_u8(self.target_component);
23243        for val in &self.id_or_mac {
23244            __tmp.put_u8(*val);
23245        }
23246        __tmp.put_u8(self.description_type as u8);
23247        for val in &self.description {
23248            __tmp.put_u8(*val);
23249        }
23250        if matches!(version, MavlinkVersion::V2) {
23251            let len = __tmp.len();
23252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23253        } else {
23254            __tmp.len()
23255        }
23256    }
23257}
23258#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23259#[doc = ""]
23260#[doc = "ID: 12904"]
23261#[derive(Debug, Clone, PartialEq)]
23262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23264#[cfg_attr(feature = "ts", derive(TS))]
23265#[cfg_attr(feature = "ts", ts(export))]
23266pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23267    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23268    pub operator_latitude: i32,
23269    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23270    pub operator_longitude: i32,
23271    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23272    pub area_ceiling: f32,
23273    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23274    pub area_floor: f32,
23275    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23276    pub operator_altitude_geo: f32,
23277    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23278    pub timestamp: u32,
23279    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23280    pub area_count: u16,
23281    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23282    pub area_radius: u16,
23283    #[doc = "System ID (0 for broadcast)."]
23284    pub target_system: u8,
23285    #[doc = "Component ID (0 for broadcast)."]
23286    pub target_component: u8,
23287    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23288    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23289    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23290    pub id_or_mac: [u8; 20],
23291    #[doc = "Specifies the operator location type."]
23292    pub operator_location_type: MavOdidOperatorLocationType,
23293    #[doc = "Specifies the classification type of the UA."]
23294    pub classification_type: MavOdidClassificationType,
23295    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23296    pub category_eu: MavOdidCategoryEu,
23297    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23298    pub class_eu: MavOdidClassEu,
23299}
23300impl OPEN_DRONE_ID_SYSTEM_DATA {
23301    pub const ENCODED_LEN: usize = 54usize;
23302    pub const DEFAULT: Self = Self {
23303        operator_latitude: 0_i32,
23304        operator_longitude: 0_i32,
23305        area_ceiling: 0.0_f32,
23306        area_floor: 0.0_f32,
23307        operator_altitude_geo: 0.0_f32,
23308        timestamp: 0_u32,
23309        area_count: 0_u16,
23310        area_radius: 0_u16,
23311        target_system: 0_u8,
23312        target_component: 0_u8,
23313        id_or_mac: [0_u8; 20usize],
23314        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23315        classification_type: MavOdidClassificationType::DEFAULT,
23316        category_eu: MavOdidCategoryEu::DEFAULT,
23317        class_eu: MavOdidClassEu::DEFAULT,
23318    };
23319    #[cfg(feature = "arbitrary")]
23320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23321        use arbitrary::{Arbitrary, Unstructured};
23322        let mut buf = [0u8; 1024];
23323        rng.fill_bytes(&mut buf);
23324        let mut unstructured = Unstructured::new(&buf);
23325        Self::arbitrary(&mut unstructured).unwrap_or_default()
23326    }
23327}
23328impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23329    fn default() -> Self {
23330        Self::DEFAULT.clone()
23331    }
23332}
23333impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23334    type Message = MavMessage;
23335    const ID: u32 = 12904u32;
23336    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23337    const EXTRA_CRC: u8 = 77u8;
23338    const ENCODED_LEN: usize = 54usize;
23339    fn deser(
23340        _version: MavlinkVersion,
23341        __input: &[u8],
23342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23343        let avail_len = __input.len();
23344        let mut payload_buf = [0; Self::ENCODED_LEN];
23345        let mut buf = if avail_len < Self::ENCODED_LEN {
23346            payload_buf[0..avail_len].copy_from_slice(__input);
23347            Bytes::new(&payload_buf)
23348        } else {
23349            Bytes::new(__input)
23350        };
23351        let mut __struct = Self::default();
23352        __struct.operator_latitude = buf.get_i32_le();
23353        __struct.operator_longitude = buf.get_i32_le();
23354        __struct.area_ceiling = buf.get_f32_le();
23355        __struct.area_floor = buf.get_f32_le();
23356        __struct.operator_altitude_geo = buf.get_f32_le();
23357        __struct.timestamp = buf.get_u32_le();
23358        __struct.area_count = buf.get_u16_le();
23359        __struct.area_radius = buf.get_u16_le();
23360        __struct.target_system = buf.get_u8();
23361        __struct.target_component = buf.get_u8();
23362        for v in &mut __struct.id_or_mac {
23363            let val = buf.get_u8();
23364            *v = val;
23365        }
23366        let tmp = buf.get_u8();
23367        __struct.operator_location_type =
23368            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23369                enum_type: "MavOdidOperatorLocationType",
23370                value: tmp as u64,
23371            })?;
23372        let tmp = buf.get_u8();
23373        __struct.classification_type =
23374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23375                enum_type: "MavOdidClassificationType",
23376                value: tmp as u64,
23377            })?;
23378        let tmp = buf.get_u8();
23379        __struct.category_eu =
23380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23381                enum_type: "MavOdidCategoryEu",
23382                value: tmp as u64,
23383            })?;
23384        let tmp = buf.get_u8();
23385        __struct.class_eu =
23386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23387                enum_type: "MavOdidClassEu",
23388                value: tmp as u64,
23389            })?;
23390        Ok(__struct)
23391    }
23392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23393        let mut __tmp = BytesMut::new(bytes);
23394        #[allow(clippy::absurd_extreme_comparisons)]
23395        #[allow(unused_comparisons)]
23396        if __tmp.remaining() < Self::ENCODED_LEN {
23397            panic!(
23398                "buffer is too small (need {} bytes, but got {})",
23399                Self::ENCODED_LEN,
23400                __tmp.remaining(),
23401            )
23402        }
23403        __tmp.put_i32_le(self.operator_latitude);
23404        __tmp.put_i32_le(self.operator_longitude);
23405        __tmp.put_f32_le(self.area_ceiling);
23406        __tmp.put_f32_le(self.area_floor);
23407        __tmp.put_f32_le(self.operator_altitude_geo);
23408        __tmp.put_u32_le(self.timestamp);
23409        __tmp.put_u16_le(self.area_count);
23410        __tmp.put_u16_le(self.area_radius);
23411        __tmp.put_u8(self.target_system);
23412        __tmp.put_u8(self.target_component);
23413        for val in &self.id_or_mac {
23414            __tmp.put_u8(*val);
23415        }
23416        __tmp.put_u8(self.operator_location_type as u8);
23417        __tmp.put_u8(self.classification_type as u8);
23418        __tmp.put_u8(self.category_eu as u8);
23419        __tmp.put_u8(self.class_eu as u8);
23420        if matches!(version, MavlinkVersion::V2) {
23421            let len = __tmp.len();
23422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23423        } else {
23424            __tmp.len()
23425        }
23426    }
23427}
23428#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23429#[doc = ""]
23430#[doc = "ID: 12919"]
23431#[derive(Debug, Clone, PartialEq)]
23432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23434#[cfg_attr(feature = "ts", derive(TS))]
23435#[cfg_attr(feature = "ts", ts(export))]
23436pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23437    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23438    pub operator_latitude: i32,
23439    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23440    pub operator_longitude: i32,
23441    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23442    pub operator_altitude_geo: f32,
23443    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23444    pub timestamp: u32,
23445    #[doc = "System ID (0 for broadcast)."]
23446    pub target_system: u8,
23447    #[doc = "Component ID (0 for broadcast)."]
23448    pub target_component: u8,
23449}
23450impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23451    pub const ENCODED_LEN: usize = 18usize;
23452    pub const DEFAULT: Self = Self {
23453        operator_latitude: 0_i32,
23454        operator_longitude: 0_i32,
23455        operator_altitude_geo: 0.0_f32,
23456        timestamp: 0_u32,
23457        target_system: 0_u8,
23458        target_component: 0_u8,
23459    };
23460    #[cfg(feature = "arbitrary")]
23461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23462        use arbitrary::{Arbitrary, Unstructured};
23463        let mut buf = [0u8; 1024];
23464        rng.fill_bytes(&mut buf);
23465        let mut unstructured = Unstructured::new(&buf);
23466        Self::arbitrary(&mut unstructured).unwrap_or_default()
23467    }
23468}
23469impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23470    fn default() -> Self {
23471        Self::DEFAULT.clone()
23472    }
23473}
23474impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23475    type Message = MavMessage;
23476    const ID: u32 = 12919u32;
23477    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23478    const EXTRA_CRC: u8 = 7u8;
23479    const ENCODED_LEN: usize = 18usize;
23480    fn deser(
23481        _version: MavlinkVersion,
23482        __input: &[u8],
23483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23484        let avail_len = __input.len();
23485        let mut payload_buf = [0; Self::ENCODED_LEN];
23486        let mut buf = if avail_len < Self::ENCODED_LEN {
23487            payload_buf[0..avail_len].copy_from_slice(__input);
23488            Bytes::new(&payload_buf)
23489        } else {
23490            Bytes::new(__input)
23491        };
23492        let mut __struct = Self::default();
23493        __struct.operator_latitude = buf.get_i32_le();
23494        __struct.operator_longitude = buf.get_i32_le();
23495        __struct.operator_altitude_geo = buf.get_f32_le();
23496        __struct.timestamp = buf.get_u32_le();
23497        __struct.target_system = buf.get_u8();
23498        __struct.target_component = buf.get_u8();
23499        Ok(__struct)
23500    }
23501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23502        let mut __tmp = BytesMut::new(bytes);
23503        #[allow(clippy::absurd_extreme_comparisons)]
23504        #[allow(unused_comparisons)]
23505        if __tmp.remaining() < Self::ENCODED_LEN {
23506            panic!(
23507                "buffer is too small (need {} bytes, but got {})",
23508                Self::ENCODED_LEN,
23509                __tmp.remaining(),
23510            )
23511        }
23512        __tmp.put_i32_le(self.operator_latitude);
23513        __tmp.put_i32_le(self.operator_longitude);
23514        __tmp.put_f32_le(self.operator_altitude_geo);
23515        __tmp.put_u32_le(self.timestamp);
23516        __tmp.put_u8(self.target_system);
23517        __tmp.put_u8(self.target_component);
23518        if matches!(version, MavlinkVersion::V2) {
23519            let len = __tmp.len();
23520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23521        } else {
23522            __tmp.len()
23523        }
23524    }
23525}
23526#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23527#[doc = ""]
23528#[doc = "ID: 100"]
23529#[derive(Debug, Clone, PartialEq)]
23530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23532#[cfg_attr(feature = "ts", derive(TS))]
23533#[cfg_attr(feature = "ts", ts(export))]
23534pub struct OPTICAL_FLOW_DATA {
23535    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23536    pub time_usec: u64,
23537    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23538    pub flow_comp_m_x: f32,
23539    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23540    pub flow_comp_m_y: f32,
23541    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23542    pub ground_distance: f32,
23543    #[doc = "Flow in x-sensor direction"]
23544    pub flow_x: i16,
23545    #[doc = "Flow in y-sensor direction"]
23546    pub flow_y: i16,
23547    #[doc = "Sensor ID"]
23548    pub sensor_id: u8,
23549    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23550    pub quality: u8,
23551    #[doc = "Flow rate about X axis"]
23552    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23553    pub flow_rate_x: f32,
23554    #[doc = "Flow rate about Y axis"]
23555    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23556    pub flow_rate_y: f32,
23557}
23558impl OPTICAL_FLOW_DATA {
23559    pub const ENCODED_LEN: usize = 34usize;
23560    pub const DEFAULT: Self = Self {
23561        time_usec: 0_u64,
23562        flow_comp_m_x: 0.0_f32,
23563        flow_comp_m_y: 0.0_f32,
23564        ground_distance: 0.0_f32,
23565        flow_x: 0_i16,
23566        flow_y: 0_i16,
23567        sensor_id: 0_u8,
23568        quality: 0_u8,
23569        flow_rate_x: 0.0_f32,
23570        flow_rate_y: 0.0_f32,
23571    };
23572    #[cfg(feature = "arbitrary")]
23573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23574        use arbitrary::{Arbitrary, Unstructured};
23575        let mut buf = [0u8; 1024];
23576        rng.fill_bytes(&mut buf);
23577        let mut unstructured = Unstructured::new(&buf);
23578        Self::arbitrary(&mut unstructured).unwrap_or_default()
23579    }
23580}
23581impl Default for OPTICAL_FLOW_DATA {
23582    fn default() -> Self {
23583        Self::DEFAULT.clone()
23584    }
23585}
23586impl MessageData for OPTICAL_FLOW_DATA {
23587    type Message = MavMessage;
23588    const ID: u32 = 100u32;
23589    const NAME: &'static str = "OPTICAL_FLOW";
23590    const EXTRA_CRC: u8 = 175u8;
23591    const ENCODED_LEN: usize = 34usize;
23592    fn deser(
23593        _version: MavlinkVersion,
23594        __input: &[u8],
23595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23596        let avail_len = __input.len();
23597        let mut payload_buf = [0; Self::ENCODED_LEN];
23598        let mut buf = if avail_len < Self::ENCODED_LEN {
23599            payload_buf[0..avail_len].copy_from_slice(__input);
23600            Bytes::new(&payload_buf)
23601        } else {
23602            Bytes::new(__input)
23603        };
23604        let mut __struct = Self::default();
23605        __struct.time_usec = buf.get_u64_le();
23606        __struct.flow_comp_m_x = buf.get_f32_le();
23607        __struct.flow_comp_m_y = buf.get_f32_le();
23608        __struct.ground_distance = buf.get_f32_le();
23609        __struct.flow_x = buf.get_i16_le();
23610        __struct.flow_y = buf.get_i16_le();
23611        __struct.sensor_id = buf.get_u8();
23612        __struct.quality = buf.get_u8();
23613        __struct.flow_rate_x = buf.get_f32_le();
23614        __struct.flow_rate_y = buf.get_f32_le();
23615        Ok(__struct)
23616    }
23617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23618        let mut __tmp = BytesMut::new(bytes);
23619        #[allow(clippy::absurd_extreme_comparisons)]
23620        #[allow(unused_comparisons)]
23621        if __tmp.remaining() < Self::ENCODED_LEN {
23622            panic!(
23623                "buffer is too small (need {} bytes, but got {})",
23624                Self::ENCODED_LEN,
23625                __tmp.remaining(),
23626            )
23627        }
23628        __tmp.put_u64_le(self.time_usec);
23629        __tmp.put_f32_le(self.flow_comp_m_x);
23630        __tmp.put_f32_le(self.flow_comp_m_y);
23631        __tmp.put_f32_le(self.ground_distance);
23632        __tmp.put_i16_le(self.flow_x);
23633        __tmp.put_i16_le(self.flow_y);
23634        __tmp.put_u8(self.sensor_id);
23635        __tmp.put_u8(self.quality);
23636        if matches!(version, MavlinkVersion::V2) {
23637            __tmp.put_f32_le(self.flow_rate_x);
23638            __tmp.put_f32_le(self.flow_rate_y);
23639            let len = __tmp.len();
23640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23641        } else {
23642            __tmp.len()
23643        }
23644    }
23645}
23646#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23647#[doc = ""]
23648#[doc = "ID: 106"]
23649#[derive(Debug, Clone, PartialEq)]
23650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23652#[cfg_attr(feature = "ts", derive(TS))]
23653#[cfg_attr(feature = "ts", ts(export))]
23654pub struct OPTICAL_FLOW_RAD_DATA {
23655    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23656    pub time_usec: u64,
23657    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23658    pub integration_time_us: u32,
23659    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23660    pub integrated_x: f32,
23661    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23662    pub integrated_y: f32,
23663    #[doc = "RH rotation around X axis"]
23664    pub integrated_xgyro: f32,
23665    #[doc = "RH rotation around Y axis"]
23666    pub integrated_ygyro: f32,
23667    #[doc = "RH rotation around Z axis"]
23668    pub integrated_zgyro: f32,
23669    #[doc = "Time since the distance was sampled."]
23670    pub time_delta_distance_us: u32,
23671    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23672    pub distance: f32,
23673    #[doc = "Temperature"]
23674    pub temperature: i16,
23675    #[doc = "Sensor ID"]
23676    pub sensor_id: u8,
23677    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23678    pub quality: u8,
23679}
23680impl OPTICAL_FLOW_RAD_DATA {
23681    pub const ENCODED_LEN: usize = 44usize;
23682    pub const DEFAULT: Self = Self {
23683        time_usec: 0_u64,
23684        integration_time_us: 0_u32,
23685        integrated_x: 0.0_f32,
23686        integrated_y: 0.0_f32,
23687        integrated_xgyro: 0.0_f32,
23688        integrated_ygyro: 0.0_f32,
23689        integrated_zgyro: 0.0_f32,
23690        time_delta_distance_us: 0_u32,
23691        distance: 0.0_f32,
23692        temperature: 0_i16,
23693        sensor_id: 0_u8,
23694        quality: 0_u8,
23695    };
23696    #[cfg(feature = "arbitrary")]
23697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23698        use arbitrary::{Arbitrary, Unstructured};
23699        let mut buf = [0u8; 1024];
23700        rng.fill_bytes(&mut buf);
23701        let mut unstructured = Unstructured::new(&buf);
23702        Self::arbitrary(&mut unstructured).unwrap_or_default()
23703    }
23704}
23705impl Default for OPTICAL_FLOW_RAD_DATA {
23706    fn default() -> Self {
23707        Self::DEFAULT.clone()
23708    }
23709}
23710impl MessageData for OPTICAL_FLOW_RAD_DATA {
23711    type Message = MavMessage;
23712    const ID: u32 = 106u32;
23713    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23714    const EXTRA_CRC: u8 = 138u8;
23715    const ENCODED_LEN: usize = 44usize;
23716    fn deser(
23717        _version: MavlinkVersion,
23718        __input: &[u8],
23719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23720        let avail_len = __input.len();
23721        let mut payload_buf = [0; Self::ENCODED_LEN];
23722        let mut buf = if avail_len < Self::ENCODED_LEN {
23723            payload_buf[0..avail_len].copy_from_slice(__input);
23724            Bytes::new(&payload_buf)
23725        } else {
23726            Bytes::new(__input)
23727        };
23728        let mut __struct = Self::default();
23729        __struct.time_usec = buf.get_u64_le();
23730        __struct.integration_time_us = buf.get_u32_le();
23731        __struct.integrated_x = buf.get_f32_le();
23732        __struct.integrated_y = buf.get_f32_le();
23733        __struct.integrated_xgyro = buf.get_f32_le();
23734        __struct.integrated_ygyro = buf.get_f32_le();
23735        __struct.integrated_zgyro = buf.get_f32_le();
23736        __struct.time_delta_distance_us = buf.get_u32_le();
23737        __struct.distance = buf.get_f32_le();
23738        __struct.temperature = buf.get_i16_le();
23739        __struct.sensor_id = buf.get_u8();
23740        __struct.quality = buf.get_u8();
23741        Ok(__struct)
23742    }
23743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23744        let mut __tmp = BytesMut::new(bytes);
23745        #[allow(clippy::absurd_extreme_comparisons)]
23746        #[allow(unused_comparisons)]
23747        if __tmp.remaining() < Self::ENCODED_LEN {
23748            panic!(
23749                "buffer is too small (need {} bytes, but got {})",
23750                Self::ENCODED_LEN,
23751                __tmp.remaining(),
23752            )
23753        }
23754        __tmp.put_u64_le(self.time_usec);
23755        __tmp.put_u32_le(self.integration_time_us);
23756        __tmp.put_f32_le(self.integrated_x);
23757        __tmp.put_f32_le(self.integrated_y);
23758        __tmp.put_f32_le(self.integrated_xgyro);
23759        __tmp.put_f32_le(self.integrated_ygyro);
23760        __tmp.put_f32_le(self.integrated_zgyro);
23761        __tmp.put_u32_le(self.time_delta_distance_us);
23762        __tmp.put_f32_le(self.distance);
23763        __tmp.put_i16_le(self.temperature);
23764        __tmp.put_u8(self.sensor_id);
23765        __tmp.put_u8(self.quality);
23766        if matches!(version, MavlinkVersion::V2) {
23767            let len = __tmp.len();
23768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23769        } else {
23770            __tmp.len()
23771        }
23772    }
23773}
23774#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23775#[doc = ""]
23776#[doc = "ID: 360"]
23777#[derive(Debug, Clone, PartialEq)]
23778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23780#[cfg_attr(feature = "ts", derive(TS))]
23781#[cfg_attr(feature = "ts", ts(export))]
23782pub struct ORBIT_EXECUTION_STATUS_DATA {
23783    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23784    pub time_usec: u64,
23785    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23786    pub radius: f32,
23787    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23788    pub x: i32,
23789    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23790    pub y: i32,
23791    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23792    pub z: f32,
23793    #[doc = "The coordinate system of the fields: x, y, z."]
23794    pub frame: MavFrame,
23795}
23796impl ORBIT_EXECUTION_STATUS_DATA {
23797    pub const ENCODED_LEN: usize = 25usize;
23798    pub const DEFAULT: Self = Self {
23799        time_usec: 0_u64,
23800        radius: 0.0_f32,
23801        x: 0_i32,
23802        y: 0_i32,
23803        z: 0.0_f32,
23804        frame: MavFrame::DEFAULT,
23805    };
23806    #[cfg(feature = "arbitrary")]
23807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23808        use arbitrary::{Arbitrary, Unstructured};
23809        let mut buf = [0u8; 1024];
23810        rng.fill_bytes(&mut buf);
23811        let mut unstructured = Unstructured::new(&buf);
23812        Self::arbitrary(&mut unstructured).unwrap_or_default()
23813    }
23814}
23815impl Default for ORBIT_EXECUTION_STATUS_DATA {
23816    fn default() -> Self {
23817        Self::DEFAULT.clone()
23818    }
23819}
23820impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23821    type Message = MavMessage;
23822    const ID: u32 = 360u32;
23823    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23824    const EXTRA_CRC: u8 = 11u8;
23825    const ENCODED_LEN: usize = 25usize;
23826    fn deser(
23827        _version: MavlinkVersion,
23828        __input: &[u8],
23829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23830        let avail_len = __input.len();
23831        let mut payload_buf = [0; Self::ENCODED_LEN];
23832        let mut buf = if avail_len < Self::ENCODED_LEN {
23833            payload_buf[0..avail_len].copy_from_slice(__input);
23834            Bytes::new(&payload_buf)
23835        } else {
23836            Bytes::new(__input)
23837        };
23838        let mut __struct = Self::default();
23839        __struct.time_usec = buf.get_u64_le();
23840        __struct.radius = buf.get_f32_le();
23841        __struct.x = buf.get_i32_le();
23842        __struct.y = buf.get_i32_le();
23843        __struct.z = buf.get_f32_le();
23844        let tmp = buf.get_u8();
23845        __struct.frame =
23846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23847                enum_type: "MavFrame",
23848                value: tmp as u64,
23849            })?;
23850        Ok(__struct)
23851    }
23852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23853        let mut __tmp = BytesMut::new(bytes);
23854        #[allow(clippy::absurd_extreme_comparisons)]
23855        #[allow(unused_comparisons)]
23856        if __tmp.remaining() < Self::ENCODED_LEN {
23857            panic!(
23858                "buffer is too small (need {} bytes, but got {})",
23859                Self::ENCODED_LEN,
23860                __tmp.remaining(),
23861            )
23862        }
23863        __tmp.put_u64_le(self.time_usec);
23864        __tmp.put_f32_le(self.radius);
23865        __tmp.put_i32_le(self.x);
23866        __tmp.put_i32_le(self.y);
23867        __tmp.put_f32_le(self.z);
23868        __tmp.put_u8(self.frame as u8);
23869        if matches!(version, MavlinkVersion::V2) {
23870            let len = __tmp.len();
23871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23872        } else {
23873            __tmp.len()
23874        }
23875    }
23876}
23877#[doc = "Response from a PARAM_EXT_SET message."]
23878#[doc = ""]
23879#[doc = "ID: 324"]
23880#[derive(Debug, Clone, PartialEq)]
23881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23883#[cfg_attr(feature = "ts", derive(TS))]
23884#[cfg_attr(feature = "ts", ts(export))]
23885pub struct PARAM_EXT_ACK_DATA {
23886    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23887    #[cfg_attr(feature = "ts", ts(type = "string"))]
23888    pub param_id: CharArray<16>,
23889    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23890    #[cfg_attr(feature = "ts", ts(type = "string"))]
23891    pub param_value: CharArray<128>,
23892    #[doc = "Parameter type."]
23893    pub param_type: MavParamExtType,
23894    #[doc = "Result code."]
23895    pub param_result: ParamAck,
23896}
23897impl PARAM_EXT_ACK_DATA {
23898    pub const ENCODED_LEN: usize = 146usize;
23899    pub const DEFAULT: Self = Self {
23900        param_id: CharArray::new([0_u8; 16usize]),
23901        param_value: CharArray::new([0_u8; 128usize]),
23902        param_type: MavParamExtType::DEFAULT,
23903        param_result: ParamAck::DEFAULT,
23904    };
23905    #[cfg(feature = "arbitrary")]
23906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23907        use arbitrary::{Arbitrary, Unstructured};
23908        let mut buf = [0u8; 1024];
23909        rng.fill_bytes(&mut buf);
23910        let mut unstructured = Unstructured::new(&buf);
23911        Self::arbitrary(&mut unstructured).unwrap_or_default()
23912    }
23913}
23914impl Default for PARAM_EXT_ACK_DATA {
23915    fn default() -> Self {
23916        Self::DEFAULT.clone()
23917    }
23918}
23919impl MessageData for PARAM_EXT_ACK_DATA {
23920    type Message = MavMessage;
23921    const ID: u32 = 324u32;
23922    const NAME: &'static str = "PARAM_EXT_ACK";
23923    const EXTRA_CRC: u8 = 132u8;
23924    const ENCODED_LEN: usize = 146usize;
23925    fn deser(
23926        _version: MavlinkVersion,
23927        __input: &[u8],
23928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23929        let avail_len = __input.len();
23930        let mut payload_buf = [0; Self::ENCODED_LEN];
23931        let mut buf = if avail_len < Self::ENCODED_LEN {
23932            payload_buf[0..avail_len].copy_from_slice(__input);
23933            Bytes::new(&payload_buf)
23934        } else {
23935            Bytes::new(__input)
23936        };
23937        let mut __struct = Self::default();
23938        let mut tmp = [0_u8; 16usize];
23939        for v in &mut tmp {
23940            *v = buf.get_u8();
23941        }
23942        __struct.param_id = CharArray::new(tmp);
23943        let mut tmp = [0_u8; 128usize];
23944        for v in &mut tmp {
23945            *v = buf.get_u8();
23946        }
23947        __struct.param_value = CharArray::new(tmp);
23948        let tmp = buf.get_u8();
23949        __struct.param_type =
23950            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23951                enum_type: "MavParamExtType",
23952                value: tmp as u64,
23953            })?;
23954        let tmp = buf.get_u8();
23955        __struct.param_result =
23956            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23957                enum_type: "ParamAck",
23958                value: tmp as u64,
23959            })?;
23960        Ok(__struct)
23961    }
23962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23963        let mut __tmp = BytesMut::new(bytes);
23964        #[allow(clippy::absurd_extreme_comparisons)]
23965        #[allow(unused_comparisons)]
23966        if __tmp.remaining() < Self::ENCODED_LEN {
23967            panic!(
23968                "buffer is too small (need {} bytes, but got {})",
23969                Self::ENCODED_LEN,
23970                __tmp.remaining(),
23971            )
23972        }
23973        for val in &self.param_id {
23974            __tmp.put_u8(*val);
23975        }
23976        for val in &self.param_value {
23977            __tmp.put_u8(*val);
23978        }
23979        __tmp.put_u8(self.param_type as u8);
23980        __tmp.put_u8(self.param_result as u8);
23981        if matches!(version, MavlinkVersion::V2) {
23982            let len = __tmp.len();
23983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23984        } else {
23985            __tmp.len()
23986        }
23987    }
23988}
23989#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23990#[doc = ""]
23991#[doc = "ID: 321"]
23992#[derive(Debug, Clone, PartialEq)]
23993#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23995#[cfg_attr(feature = "ts", derive(TS))]
23996#[cfg_attr(feature = "ts", ts(export))]
23997pub struct PARAM_EXT_REQUEST_LIST_DATA {
23998    #[doc = "System ID"]
23999    pub target_system: u8,
24000    #[doc = "Component ID"]
24001    pub target_component: u8,
24002}
24003impl PARAM_EXT_REQUEST_LIST_DATA {
24004    pub const ENCODED_LEN: usize = 2usize;
24005    pub const DEFAULT: Self = Self {
24006        target_system: 0_u8,
24007        target_component: 0_u8,
24008    };
24009    #[cfg(feature = "arbitrary")]
24010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24011        use arbitrary::{Arbitrary, Unstructured};
24012        let mut buf = [0u8; 1024];
24013        rng.fill_bytes(&mut buf);
24014        let mut unstructured = Unstructured::new(&buf);
24015        Self::arbitrary(&mut unstructured).unwrap_or_default()
24016    }
24017}
24018impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24019    fn default() -> Self {
24020        Self::DEFAULT.clone()
24021    }
24022}
24023impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24024    type Message = MavMessage;
24025    const ID: u32 = 321u32;
24026    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24027    const EXTRA_CRC: u8 = 88u8;
24028    const ENCODED_LEN: usize = 2usize;
24029    fn deser(
24030        _version: MavlinkVersion,
24031        __input: &[u8],
24032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24033        let avail_len = __input.len();
24034        let mut payload_buf = [0; Self::ENCODED_LEN];
24035        let mut buf = if avail_len < Self::ENCODED_LEN {
24036            payload_buf[0..avail_len].copy_from_slice(__input);
24037            Bytes::new(&payload_buf)
24038        } else {
24039            Bytes::new(__input)
24040        };
24041        let mut __struct = Self::default();
24042        __struct.target_system = buf.get_u8();
24043        __struct.target_component = buf.get_u8();
24044        Ok(__struct)
24045    }
24046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24047        let mut __tmp = BytesMut::new(bytes);
24048        #[allow(clippy::absurd_extreme_comparisons)]
24049        #[allow(unused_comparisons)]
24050        if __tmp.remaining() < Self::ENCODED_LEN {
24051            panic!(
24052                "buffer is too small (need {} bytes, but got {})",
24053                Self::ENCODED_LEN,
24054                __tmp.remaining(),
24055            )
24056        }
24057        __tmp.put_u8(self.target_system);
24058        __tmp.put_u8(self.target_component);
24059        if matches!(version, MavlinkVersion::V2) {
24060            let len = __tmp.len();
24061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24062        } else {
24063            __tmp.len()
24064        }
24065    }
24066}
24067#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24068#[doc = ""]
24069#[doc = "ID: 320"]
24070#[derive(Debug, Clone, PartialEq)]
24071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24073#[cfg_attr(feature = "ts", derive(TS))]
24074#[cfg_attr(feature = "ts", ts(export))]
24075pub struct PARAM_EXT_REQUEST_READ_DATA {
24076    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24077    pub param_index: i16,
24078    #[doc = "System ID"]
24079    pub target_system: u8,
24080    #[doc = "Component ID"]
24081    pub target_component: u8,
24082    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24083    #[cfg_attr(feature = "ts", ts(type = "string"))]
24084    pub param_id: CharArray<16>,
24085}
24086impl PARAM_EXT_REQUEST_READ_DATA {
24087    pub const ENCODED_LEN: usize = 20usize;
24088    pub const DEFAULT: Self = Self {
24089        param_index: 0_i16,
24090        target_system: 0_u8,
24091        target_component: 0_u8,
24092        param_id: CharArray::new([0_u8; 16usize]),
24093    };
24094    #[cfg(feature = "arbitrary")]
24095    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24096        use arbitrary::{Arbitrary, Unstructured};
24097        let mut buf = [0u8; 1024];
24098        rng.fill_bytes(&mut buf);
24099        let mut unstructured = Unstructured::new(&buf);
24100        Self::arbitrary(&mut unstructured).unwrap_or_default()
24101    }
24102}
24103impl Default for PARAM_EXT_REQUEST_READ_DATA {
24104    fn default() -> Self {
24105        Self::DEFAULT.clone()
24106    }
24107}
24108impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24109    type Message = MavMessage;
24110    const ID: u32 = 320u32;
24111    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24112    const EXTRA_CRC: u8 = 243u8;
24113    const ENCODED_LEN: usize = 20usize;
24114    fn deser(
24115        _version: MavlinkVersion,
24116        __input: &[u8],
24117    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24118        let avail_len = __input.len();
24119        let mut payload_buf = [0; Self::ENCODED_LEN];
24120        let mut buf = if avail_len < Self::ENCODED_LEN {
24121            payload_buf[0..avail_len].copy_from_slice(__input);
24122            Bytes::new(&payload_buf)
24123        } else {
24124            Bytes::new(__input)
24125        };
24126        let mut __struct = Self::default();
24127        __struct.param_index = buf.get_i16_le();
24128        __struct.target_system = buf.get_u8();
24129        __struct.target_component = buf.get_u8();
24130        let mut tmp = [0_u8; 16usize];
24131        for v in &mut tmp {
24132            *v = buf.get_u8();
24133        }
24134        __struct.param_id = CharArray::new(tmp);
24135        Ok(__struct)
24136    }
24137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24138        let mut __tmp = BytesMut::new(bytes);
24139        #[allow(clippy::absurd_extreme_comparisons)]
24140        #[allow(unused_comparisons)]
24141        if __tmp.remaining() < Self::ENCODED_LEN {
24142            panic!(
24143                "buffer is too small (need {} bytes, but got {})",
24144                Self::ENCODED_LEN,
24145                __tmp.remaining(),
24146            )
24147        }
24148        __tmp.put_i16_le(self.param_index);
24149        __tmp.put_u8(self.target_system);
24150        __tmp.put_u8(self.target_component);
24151        for val in &self.param_id {
24152            __tmp.put_u8(*val);
24153        }
24154        if matches!(version, MavlinkVersion::V2) {
24155            let len = __tmp.len();
24156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24157        } else {
24158            __tmp.len()
24159        }
24160    }
24161}
24162#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24163#[doc = ""]
24164#[doc = "ID: 323"]
24165#[derive(Debug, Clone, PartialEq)]
24166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24168#[cfg_attr(feature = "ts", derive(TS))]
24169#[cfg_attr(feature = "ts", ts(export))]
24170pub struct PARAM_EXT_SET_DATA {
24171    #[doc = "System ID"]
24172    pub target_system: u8,
24173    #[doc = "Component ID"]
24174    pub target_component: u8,
24175    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24176    #[cfg_attr(feature = "ts", ts(type = "string"))]
24177    pub param_id: CharArray<16>,
24178    #[doc = "Parameter value"]
24179    #[cfg_attr(feature = "ts", ts(type = "string"))]
24180    pub param_value: CharArray<128>,
24181    #[doc = "Parameter type."]
24182    pub param_type: MavParamExtType,
24183}
24184impl PARAM_EXT_SET_DATA {
24185    pub const ENCODED_LEN: usize = 147usize;
24186    pub const DEFAULT: Self = Self {
24187        target_system: 0_u8,
24188        target_component: 0_u8,
24189        param_id: CharArray::new([0_u8; 16usize]),
24190        param_value: CharArray::new([0_u8; 128usize]),
24191        param_type: MavParamExtType::DEFAULT,
24192    };
24193    #[cfg(feature = "arbitrary")]
24194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24195        use arbitrary::{Arbitrary, Unstructured};
24196        let mut buf = [0u8; 1024];
24197        rng.fill_bytes(&mut buf);
24198        let mut unstructured = Unstructured::new(&buf);
24199        Self::arbitrary(&mut unstructured).unwrap_or_default()
24200    }
24201}
24202impl Default for PARAM_EXT_SET_DATA {
24203    fn default() -> Self {
24204        Self::DEFAULT.clone()
24205    }
24206}
24207impl MessageData for PARAM_EXT_SET_DATA {
24208    type Message = MavMessage;
24209    const ID: u32 = 323u32;
24210    const NAME: &'static str = "PARAM_EXT_SET";
24211    const EXTRA_CRC: u8 = 78u8;
24212    const ENCODED_LEN: usize = 147usize;
24213    fn deser(
24214        _version: MavlinkVersion,
24215        __input: &[u8],
24216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24217        let avail_len = __input.len();
24218        let mut payload_buf = [0; Self::ENCODED_LEN];
24219        let mut buf = if avail_len < Self::ENCODED_LEN {
24220            payload_buf[0..avail_len].copy_from_slice(__input);
24221            Bytes::new(&payload_buf)
24222        } else {
24223            Bytes::new(__input)
24224        };
24225        let mut __struct = Self::default();
24226        __struct.target_system = buf.get_u8();
24227        __struct.target_component = buf.get_u8();
24228        let mut tmp = [0_u8; 16usize];
24229        for v in &mut tmp {
24230            *v = buf.get_u8();
24231        }
24232        __struct.param_id = CharArray::new(tmp);
24233        let mut tmp = [0_u8; 128usize];
24234        for v in &mut tmp {
24235            *v = buf.get_u8();
24236        }
24237        __struct.param_value = CharArray::new(tmp);
24238        let tmp = buf.get_u8();
24239        __struct.param_type =
24240            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24241                enum_type: "MavParamExtType",
24242                value: tmp as u64,
24243            })?;
24244        Ok(__struct)
24245    }
24246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24247        let mut __tmp = BytesMut::new(bytes);
24248        #[allow(clippy::absurd_extreme_comparisons)]
24249        #[allow(unused_comparisons)]
24250        if __tmp.remaining() < Self::ENCODED_LEN {
24251            panic!(
24252                "buffer is too small (need {} bytes, but got {})",
24253                Self::ENCODED_LEN,
24254                __tmp.remaining(),
24255            )
24256        }
24257        __tmp.put_u8(self.target_system);
24258        __tmp.put_u8(self.target_component);
24259        for val in &self.param_id {
24260            __tmp.put_u8(*val);
24261        }
24262        for val in &self.param_value {
24263            __tmp.put_u8(*val);
24264        }
24265        __tmp.put_u8(self.param_type as u8);
24266        if matches!(version, MavlinkVersion::V2) {
24267            let len = __tmp.len();
24268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24269        } else {
24270            __tmp.len()
24271        }
24272    }
24273}
24274#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24275#[doc = ""]
24276#[doc = "ID: 322"]
24277#[derive(Debug, Clone, PartialEq)]
24278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24280#[cfg_attr(feature = "ts", derive(TS))]
24281#[cfg_attr(feature = "ts", ts(export))]
24282pub struct PARAM_EXT_VALUE_DATA {
24283    #[doc = "Total number of parameters"]
24284    pub param_count: u16,
24285    #[doc = "Index of this parameter"]
24286    pub param_index: u16,
24287    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24288    #[cfg_attr(feature = "ts", ts(type = "string"))]
24289    pub param_id: CharArray<16>,
24290    #[doc = "Parameter value"]
24291    #[cfg_attr(feature = "ts", ts(type = "string"))]
24292    pub param_value: CharArray<128>,
24293    #[doc = "Parameter type."]
24294    pub param_type: MavParamExtType,
24295}
24296impl PARAM_EXT_VALUE_DATA {
24297    pub const ENCODED_LEN: usize = 149usize;
24298    pub const DEFAULT: Self = Self {
24299        param_count: 0_u16,
24300        param_index: 0_u16,
24301        param_id: CharArray::new([0_u8; 16usize]),
24302        param_value: CharArray::new([0_u8; 128usize]),
24303        param_type: MavParamExtType::DEFAULT,
24304    };
24305    #[cfg(feature = "arbitrary")]
24306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24307        use arbitrary::{Arbitrary, Unstructured};
24308        let mut buf = [0u8; 1024];
24309        rng.fill_bytes(&mut buf);
24310        let mut unstructured = Unstructured::new(&buf);
24311        Self::arbitrary(&mut unstructured).unwrap_or_default()
24312    }
24313}
24314impl Default for PARAM_EXT_VALUE_DATA {
24315    fn default() -> Self {
24316        Self::DEFAULT.clone()
24317    }
24318}
24319impl MessageData for PARAM_EXT_VALUE_DATA {
24320    type Message = MavMessage;
24321    const ID: u32 = 322u32;
24322    const NAME: &'static str = "PARAM_EXT_VALUE";
24323    const EXTRA_CRC: u8 = 243u8;
24324    const ENCODED_LEN: usize = 149usize;
24325    fn deser(
24326        _version: MavlinkVersion,
24327        __input: &[u8],
24328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24329        let avail_len = __input.len();
24330        let mut payload_buf = [0; Self::ENCODED_LEN];
24331        let mut buf = if avail_len < Self::ENCODED_LEN {
24332            payload_buf[0..avail_len].copy_from_slice(__input);
24333            Bytes::new(&payload_buf)
24334        } else {
24335            Bytes::new(__input)
24336        };
24337        let mut __struct = Self::default();
24338        __struct.param_count = buf.get_u16_le();
24339        __struct.param_index = buf.get_u16_le();
24340        let mut tmp = [0_u8; 16usize];
24341        for v in &mut tmp {
24342            *v = buf.get_u8();
24343        }
24344        __struct.param_id = CharArray::new(tmp);
24345        let mut tmp = [0_u8; 128usize];
24346        for v in &mut tmp {
24347            *v = buf.get_u8();
24348        }
24349        __struct.param_value = CharArray::new(tmp);
24350        let tmp = buf.get_u8();
24351        __struct.param_type =
24352            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24353                enum_type: "MavParamExtType",
24354                value: tmp as u64,
24355            })?;
24356        Ok(__struct)
24357    }
24358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24359        let mut __tmp = BytesMut::new(bytes);
24360        #[allow(clippy::absurd_extreme_comparisons)]
24361        #[allow(unused_comparisons)]
24362        if __tmp.remaining() < Self::ENCODED_LEN {
24363            panic!(
24364                "buffer is too small (need {} bytes, but got {})",
24365                Self::ENCODED_LEN,
24366                __tmp.remaining(),
24367            )
24368        }
24369        __tmp.put_u16_le(self.param_count);
24370        __tmp.put_u16_le(self.param_index);
24371        for val in &self.param_id {
24372            __tmp.put_u8(*val);
24373        }
24374        for val in &self.param_value {
24375            __tmp.put_u8(*val);
24376        }
24377        __tmp.put_u8(self.param_type as u8);
24378        if matches!(version, MavlinkVersion::V2) {
24379            let len = __tmp.len();
24380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24381        } else {
24382            __tmp.len()
24383        }
24384    }
24385}
24386#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24387#[doc = ""]
24388#[doc = "ID: 50"]
24389#[derive(Debug, Clone, PartialEq)]
24390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24392#[cfg_attr(feature = "ts", derive(TS))]
24393#[cfg_attr(feature = "ts", ts(export))]
24394pub struct PARAM_MAP_RC_DATA {
24395    #[doc = "Initial parameter value"]
24396    pub param_value0: f32,
24397    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24398    pub scale: f32,
24399    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24400    pub param_value_min: f32,
24401    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24402    pub param_value_max: f32,
24403    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24404    pub param_index: i16,
24405    #[doc = "System ID"]
24406    pub target_system: u8,
24407    #[doc = "Component ID"]
24408    pub target_component: u8,
24409    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24410    #[cfg_attr(feature = "ts", ts(type = "string"))]
24411    pub param_id: CharArray<16>,
24412    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24413    pub parameter_rc_channel_index: u8,
24414}
24415impl PARAM_MAP_RC_DATA {
24416    pub const ENCODED_LEN: usize = 37usize;
24417    pub const DEFAULT: Self = Self {
24418        param_value0: 0.0_f32,
24419        scale: 0.0_f32,
24420        param_value_min: 0.0_f32,
24421        param_value_max: 0.0_f32,
24422        param_index: 0_i16,
24423        target_system: 0_u8,
24424        target_component: 0_u8,
24425        param_id: CharArray::new([0_u8; 16usize]),
24426        parameter_rc_channel_index: 0_u8,
24427    };
24428    #[cfg(feature = "arbitrary")]
24429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24430        use arbitrary::{Arbitrary, Unstructured};
24431        let mut buf = [0u8; 1024];
24432        rng.fill_bytes(&mut buf);
24433        let mut unstructured = Unstructured::new(&buf);
24434        Self::arbitrary(&mut unstructured).unwrap_or_default()
24435    }
24436}
24437impl Default for PARAM_MAP_RC_DATA {
24438    fn default() -> Self {
24439        Self::DEFAULT.clone()
24440    }
24441}
24442impl MessageData for PARAM_MAP_RC_DATA {
24443    type Message = MavMessage;
24444    const ID: u32 = 50u32;
24445    const NAME: &'static str = "PARAM_MAP_RC";
24446    const EXTRA_CRC: u8 = 78u8;
24447    const ENCODED_LEN: usize = 37usize;
24448    fn deser(
24449        _version: MavlinkVersion,
24450        __input: &[u8],
24451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24452        let avail_len = __input.len();
24453        let mut payload_buf = [0; Self::ENCODED_LEN];
24454        let mut buf = if avail_len < Self::ENCODED_LEN {
24455            payload_buf[0..avail_len].copy_from_slice(__input);
24456            Bytes::new(&payload_buf)
24457        } else {
24458            Bytes::new(__input)
24459        };
24460        let mut __struct = Self::default();
24461        __struct.param_value0 = buf.get_f32_le();
24462        __struct.scale = buf.get_f32_le();
24463        __struct.param_value_min = buf.get_f32_le();
24464        __struct.param_value_max = buf.get_f32_le();
24465        __struct.param_index = buf.get_i16_le();
24466        __struct.target_system = buf.get_u8();
24467        __struct.target_component = buf.get_u8();
24468        let mut tmp = [0_u8; 16usize];
24469        for v in &mut tmp {
24470            *v = buf.get_u8();
24471        }
24472        __struct.param_id = CharArray::new(tmp);
24473        __struct.parameter_rc_channel_index = buf.get_u8();
24474        Ok(__struct)
24475    }
24476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24477        let mut __tmp = BytesMut::new(bytes);
24478        #[allow(clippy::absurd_extreme_comparisons)]
24479        #[allow(unused_comparisons)]
24480        if __tmp.remaining() < Self::ENCODED_LEN {
24481            panic!(
24482                "buffer is too small (need {} bytes, but got {})",
24483                Self::ENCODED_LEN,
24484                __tmp.remaining(),
24485            )
24486        }
24487        __tmp.put_f32_le(self.param_value0);
24488        __tmp.put_f32_le(self.scale);
24489        __tmp.put_f32_le(self.param_value_min);
24490        __tmp.put_f32_le(self.param_value_max);
24491        __tmp.put_i16_le(self.param_index);
24492        __tmp.put_u8(self.target_system);
24493        __tmp.put_u8(self.target_component);
24494        for val in &self.param_id {
24495            __tmp.put_u8(*val);
24496        }
24497        __tmp.put_u8(self.parameter_rc_channel_index);
24498        if matches!(version, MavlinkVersion::V2) {
24499            let len = __tmp.len();
24500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24501        } else {
24502            __tmp.len()
24503        }
24504    }
24505}
24506#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24507#[doc = ""]
24508#[doc = "ID: 21"]
24509#[derive(Debug, Clone, PartialEq)]
24510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24512#[cfg_attr(feature = "ts", derive(TS))]
24513#[cfg_attr(feature = "ts", ts(export))]
24514pub struct PARAM_REQUEST_LIST_DATA {
24515    #[doc = "System ID"]
24516    pub target_system: u8,
24517    #[doc = "Component ID"]
24518    pub target_component: u8,
24519}
24520impl PARAM_REQUEST_LIST_DATA {
24521    pub const ENCODED_LEN: usize = 2usize;
24522    pub const DEFAULT: Self = Self {
24523        target_system: 0_u8,
24524        target_component: 0_u8,
24525    };
24526    #[cfg(feature = "arbitrary")]
24527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24528        use arbitrary::{Arbitrary, Unstructured};
24529        let mut buf = [0u8; 1024];
24530        rng.fill_bytes(&mut buf);
24531        let mut unstructured = Unstructured::new(&buf);
24532        Self::arbitrary(&mut unstructured).unwrap_or_default()
24533    }
24534}
24535impl Default for PARAM_REQUEST_LIST_DATA {
24536    fn default() -> Self {
24537        Self::DEFAULT.clone()
24538    }
24539}
24540impl MessageData for PARAM_REQUEST_LIST_DATA {
24541    type Message = MavMessage;
24542    const ID: u32 = 21u32;
24543    const NAME: &'static str = "PARAM_REQUEST_LIST";
24544    const EXTRA_CRC: u8 = 159u8;
24545    const ENCODED_LEN: usize = 2usize;
24546    fn deser(
24547        _version: MavlinkVersion,
24548        __input: &[u8],
24549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24550        let avail_len = __input.len();
24551        let mut payload_buf = [0; Self::ENCODED_LEN];
24552        let mut buf = if avail_len < Self::ENCODED_LEN {
24553            payload_buf[0..avail_len].copy_from_slice(__input);
24554            Bytes::new(&payload_buf)
24555        } else {
24556            Bytes::new(__input)
24557        };
24558        let mut __struct = Self::default();
24559        __struct.target_system = buf.get_u8();
24560        __struct.target_component = buf.get_u8();
24561        Ok(__struct)
24562    }
24563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24564        let mut __tmp = BytesMut::new(bytes);
24565        #[allow(clippy::absurd_extreme_comparisons)]
24566        #[allow(unused_comparisons)]
24567        if __tmp.remaining() < Self::ENCODED_LEN {
24568            panic!(
24569                "buffer is too small (need {} bytes, but got {})",
24570                Self::ENCODED_LEN,
24571                __tmp.remaining(),
24572            )
24573        }
24574        __tmp.put_u8(self.target_system);
24575        __tmp.put_u8(self.target_component);
24576        if matches!(version, MavlinkVersion::V2) {
24577            let len = __tmp.len();
24578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24579        } else {
24580            __tmp.len()
24581        }
24582    }
24583}
24584#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24585#[doc = ""]
24586#[doc = "ID: 20"]
24587#[derive(Debug, Clone, PartialEq)]
24588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24590#[cfg_attr(feature = "ts", derive(TS))]
24591#[cfg_attr(feature = "ts", ts(export))]
24592pub struct PARAM_REQUEST_READ_DATA {
24593    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24594    pub param_index: i16,
24595    #[doc = "System ID"]
24596    pub target_system: u8,
24597    #[doc = "Component ID"]
24598    pub target_component: u8,
24599    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24600    #[cfg_attr(feature = "ts", ts(type = "string"))]
24601    pub param_id: CharArray<16>,
24602}
24603impl PARAM_REQUEST_READ_DATA {
24604    pub const ENCODED_LEN: usize = 20usize;
24605    pub const DEFAULT: Self = Self {
24606        param_index: 0_i16,
24607        target_system: 0_u8,
24608        target_component: 0_u8,
24609        param_id: CharArray::new([0_u8; 16usize]),
24610    };
24611    #[cfg(feature = "arbitrary")]
24612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24613        use arbitrary::{Arbitrary, Unstructured};
24614        let mut buf = [0u8; 1024];
24615        rng.fill_bytes(&mut buf);
24616        let mut unstructured = Unstructured::new(&buf);
24617        Self::arbitrary(&mut unstructured).unwrap_or_default()
24618    }
24619}
24620impl Default for PARAM_REQUEST_READ_DATA {
24621    fn default() -> Self {
24622        Self::DEFAULT.clone()
24623    }
24624}
24625impl MessageData for PARAM_REQUEST_READ_DATA {
24626    type Message = MavMessage;
24627    const ID: u32 = 20u32;
24628    const NAME: &'static str = "PARAM_REQUEST_READ";
24629    const EXTRA_CRC: u8 = 214u8;
24630    const ENCODED_LEN: usize = 20usize;
24631    fn deser(
24632        _version: MavlinkVersion,
24633        __input: &[u8],
24634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24635        let avail_len = __input.len();
24636        let mut payload_buf = [0; Self::ENCODED_LEN];
24637        let mut buf = if avail_len < Self::ENCODED_LEN {
24638            payload_buf[0..avail_len].copy_from_slice(__input);
24639            Bytes::new(&payload_buf)
24640        } else {
24641            Bytes::new(__input)
24642        };
24643        let mut __struct = Self::default();
24644        __struct.param_index = buf.get_i16_le();
24645        __struct.target_system = buf.get_u8();
24646        __struct.target_component = buf.get_u8();
24647        let mut tmp = [0_u8; 16usize];
24648        for v in &mut tmp {
24649            *v = buf.get_u8();
24650        }
24651        __struct.param_id = CharArray::new(tmp);
24652        Ok(__struct)
24653    }
24654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24655        let mut __tmp = BytesMut::new(bytes);
24656        #[allow(clippy::absurd_extreme_comparisons)]
24657        #[allow(unused_comparisons)]
24658        if __tmp.remaining() < Self::ENCODED_LEN {
24659            panic!(
24660                "buffer is too small (need {} bytes, but got {})",
24661                Self::ENCODED_LEN,
24662                __tmp.remaining(),
24663            )
24664        }
24665        __tmp.put_i16_le(self.param_index);
24666        __tmp.put_u8(self.target_system);
24667        __tmp.put_u8(self.target_component);
24668        for val in &self.param_id {
24669            __tmp.put_u8(*val);
24670        }
24671        if matches!(version, MavlinkVersion::V2) {
24672            let len = __tmp.len();
24673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24674        } else {
24675            __tmp.len()
24676        }
24677    }
24678}
24679#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24680#[doc = ""]
24681#[doc = "ID: 23"]
24682#[derive(Debug, Clone, PartialEq)]
24683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24685#[cfg_attr(feature = "ts", derive(TS))]
24686#[cfg_attr(feature = "ts", ts(export))]
24687pub struct PARAM_SET_DATA {
24688    #[doc = "Onboard parameter value"]
24689    pub param_value: f32,
24690    #[doc = "System ID"]
24691    pub target_system: u8,
24692    #[doc = "Component ID"]
24693    pub target_component: u8,
24694    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24695    #[cfg_attr(feature = "ts", ts(type = "string"))]
24696    pub param_id: CharArray<16>,
24697    #[doc = "Onboard parameter type."]
24698    pub param_type: MavParamType,
24699}
24700impl PARAM_SET_DATA {
24701    pub const ENCODED_LEN: usize = 23usize;
24702    pub const DEFAULT: Self = Self {
24703        param_value: 0.0_f32,
24704        target_system: 0_u8,
24705        target_component: 0_u8,
24706        param_id: CharArray::new([0_u8; 16usize]),
24707        param_type: MavParamType::DEFAULT,
24708    };
24709    #[cfg(feature = "arbitrary")]
24710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24711        use arbitrary::{Arbitrary, Unstructured};
24712        let mut buf = [0u8; 1024];
24713        rng.fill_bytes(&mut buf);
24714        let mut unstructured = Unstructured::new(&buf);
24715        Self::arbitrary(&mut unstructured).unwrap_or_default()
24716    }
24717}
24718impl Default for PARAM_SET_DATA {
24719    fn default() -> Self {
24720        Self::DEFAULT.clone()
24721    }
24722}
24723impl MessageData for PARAM_SET_DATA {
24724    type Message = MavMessage;
24725    const ID: u32 = 23u32;
24726    const NAME: &'static str = "PARAM_SET";
24727    const EXTRA_CRC: u8 = 168u8;
24728    const ENCODED_LEN: usize = 23usize;
24729    fn deser(
24730        _version: MavlinkVersion,
24731        __input: &[u8],
24732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24733        let avail_len = __input.len();
24734        let mut payload_buf = [0; Self::ENCODED_LEN];
24735        let mut buf = if avail_len < Self::ENCODED_LEN {
24736            payload_buf[0..avail_len].copy_from_slice(__input);
24737            Bytes::new(&payload_buf)
24738        } else {
24739            Bytes::new(__input)
24740        };
24741        let mut __struct = Self::default();
24742        __struct.param_value = buf.get_f32_le();
24743        __struct.target_system = buf.get_u8();
24744        __struct.target_component = buf.get_u8();
24745        let mut tmp = [0_u8; 16usize];
24746        for v in &mut tmp {
24747            *v = buf.get_u8();
24748        }
24749        __struct.param_id = CharArray::new(tmp);
24750        let tmp = buf.get_u8();
24751        __struct.param_type =
24752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24753                enum_type: "MavParamType",
24754                value: tmp as u64,
24755            })?;
24756        Ok(__struct)
24757    }
24758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24759        let mut __tmp = BytesMut::new(bytes);
24760        #[allow(clippy::absurd_extreme_comparisons)]
24761        #[allow(unused_comparisons)]
24762        if __tmp.remaining() < Self::ENCODED_LEN {
24763            panic!(
24764                "buffer is too small (need {} bytes, but got {})",
24765                Self::ENCODED_LEN,
24766                __tmp.remaining(),
24767            )
24768        }
24769        __tmp.put_f32_le(self.param_value);
24770        __tmp.put_u8(self.target_system);
24771        __tmp.put_u8(self.target_component);
24772        for val in &self.param_id {
24773            __tmp.put_u8(*val);
24774        }
24775        __tmp.put_u8(self.param_type as u8);
24776        if matches!(version, MavlinkVersion::V2) {
24777            let len = __tmp.len();
24778            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24779        } else {
24780            __tmp.len()
24781        }
24782    }
24783}
24784#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24785#[doc = ""]
24786#[doc = "ID: 22"]
24787#[derive(Debug, Clone, PartialEq)]
24788#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24790#[cfg_attr(feature = "ts", derive(TS))]
24791#[cfg_attr(feature = "ts", ts(export))]
24792pub struct PARAM_VALUE_DATA {
24793    #[doc = "Onboard parameter value"]
24794    pub param_value: f32,
24795    #[doc = "Total number of onboard parameters"]
24796    pub param_count: u16,
24797    #[doc = "Index of this onboard parameter"]
24798    pub param_index: u16,
24799    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24800    #[cfg_attr(feature = "ts", ts(type = "string"))]
24801    pub param_id: CharArray<16>,
24802    #[doc = "Onboard parameter type."]
24803    pub param_type: MavParamType,
24804}
24805impl PARAM_VALUE_DATA {
24806    pub const ENCODED_LEN: usize = 25usize;
24807    pub const DEFAULT: Self = Self {
24808        param_value: 0.0_f32,
24809        param_count: 0_u16,
24810        param_index: 0_u16,
24811        param_id: CharArray::new([0_u8; 16usize]),
24812        param_type: MavParamType::DEFAULT,
24813    };
24814    #[cfg(feature = "arbitrary")]
24815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24816        use arbitrary::{Arbitrary, Unstructured};
24817        let mut buf = [0u8; 1024];
24818        rng.fill_bytes(&mut buf);
24819        let mut unstructured = Unstructured::new(&buf);
24820        Self::arbitrary(&mut unstructured).unwrap_or_default()
24821    }
24822}
24823impl Default for PARAM_VALUE_DATA {
24824    fn default() -> Self {
24825        Self::DEFAULT.clone()
24826    }
24827}
24828impl MessageData for PARAM_VALUE_DATA {
24829    type Message = MavMessage;
24830    const ID: u32 = 22u32;
24831    const NAME: &'static str = "PARAM_VALUE";
24832    const EXTRA_CRC: u8 = 220u8;
24833    const ENCODED_LEN: usize = 25usize;
24834    fn deser(
24835        _version: MavlinkVersion,
24836        __input: &[u8],
24837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24838        let avail_len = __input.len();
24839        let mut payload_buf = [0; Self::ENCODED_LEN];
24840        let mut buf = if avail_len < Self::ENCODED_LEN {
24841            payload_buf[0..avail_len].copy_from_slice(__input);
24842            Bytes::new(&payload_buf)
24843        } else {
24844            Bytes::new(__input)
24845        };
24846        let mut __struct = Self::default();
24847        __struct.param_value = buf.get_f32_le();
24848        __struct.param_count = buf.get_u16_le();
24849        __struct.param_index = buf.get_u16_le();
24850        let mut tmp = [0_u8; 16usize];
24851        for v in &mut tmp {
24852            *v = buf.get_u8();
24853        }
24854        __struct.param_id = CharArray::new(tmp);
24855        let tmp = buf.get_u8();
24856        __struct.param_type =
24857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24858                enum_type: "MavParamType",
24859                value: tmp as u64,
24860            })?;
24861        Ok(__struct)
24862    }
24863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24864        let mut __tmp = BytesMut::new(bytes);
24865        #[allow(clippy::absurd_extreme_comparisons)]
24866        #[allow(unused_comparisons)]
24867        if __tmp.remaining() < Self::ENCODED_LEN {
24868            panic!(
24869                "buffer is too small (need {} bytes, but got {})",
24870                Self::ENCODED_LEN,
24871                __tmp.remaining(),
24872            )
24873        }
24874        __tmp.put_f32_le(self.param_value);
24875        __tmp.put_u16_le(self.param_count);
24876        __tmp.put_u16_le(self.param_index);
24877        for val in &self.param_id {
24878            __tmp.put_u8(*val);
24879        }
24880        __tmp.put_u8(self.param_type as u8);
24881        if matches!(version, MavlinkVersion::V2) {
24882            let len = __tmp.len();
24883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24884        } else {
24885            __tmp.len()
24886        }
24887    }
24888}
24889#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24890#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24891#[doc = ""]
24892#[doc = "ID: 4"]
24893#[derive(Debug, Clone, PartialEq)]
24894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24896#[cfg_attr(feature = "ts", derive(TS))]
24897#[cfg_attr(feature = "ts", ts(export))]
24898pub struct PING_DATA {
24899    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24900    pub time_usec: u64,
24901    #[doc = "PING sequence"]
24902    pub seq: u32,
24903    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24904    pub target_system: u8,
24905    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24906    pub target_component: u8,
24907}
24908impl PING_DATA {
24909    pub const ENCODED_LEN: usize = 14usize;
24910    pub const DEFAULT: Self = Self {
24911        time_usec: 0_u64,
24912        seq: 0_u32,
24913        target_system: 0_u8,
24914        target_component: 0_u8,
24915    };
24916    #[cfg(feature = "arbitrary")]
24917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24918        use arbitrary::{Arbitrary, Unstructured};
24919        let mut buf = [0u8; 1024];
24920        rng.fill_bytes(&mut buf);
24921        let mut unstructured = Unstructured::new(&buf);
24922        Self::arbitrary(&mut unstructured).unwrap_or_default()
24923    }
24924}
24925impl Default for PING_DATA {
24926    fn default() -> Self {
24927        Self::DEFAULT.clone()
24928    }
24929}
24930impl MessageData for PING_DATA {
24931    type Message = MavMessage;
24932    const ID: u32 = 4u32;
24933    const NAME: &'static str = "PING";
24934    const EXTRA_CRC: u8 = 237u8;
24935    const ENCODED_LEN: usize = 14usize;
24936    fn deser(
24937        _version: MavlinkVersion,
24938        __input: &[u8],
24939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24940        let avail_len = __input.len();
24941        let mut payload_buf = [0; Self::ENCODED_LEN];
24942        let mut buf = if avail_len < Self::ENCODED_LEN {
24943            payload_buf[0..avail_len].copy_from_slice(__input);
24944            Bytes::new(&payload_buf)
24945        } else {
24946            Bytes::new(__input)
24947        };
24948        let mut __struct = Self::default();
24949        __struct.time_usec = buf.get_u64_le();
24950        __struct.seq = buf.get_u32_le();
24951        __struct.target_system = buf.get_u8();
24952        __struct.target_component = buf.get_u8();
24953        Ok(__struct)
24954    }
24955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24956        let mut __tmp = BytesMut::new(bytes);
24957        #[allow(clippy::absurd_extreme_comparisons)]
24958        #[allow(unused_comparisons)]
24959        if __tmp.remaining() < Self::ENCODED_LEN {
24960            panic!(
24961                "buffer is too small (need {} bytes, but got {})",
24962                Self::ENCODED_LEN,
24963                __tmp.remaining(),
24964            )
24965        }
24966        __tmp.put_u64_le(self.time_usec);
24967        __tmp.put_u32_le(self.seq);
24968        __tmp.put_u8(self.target_system);
24969        __tmp.put_u8(self.target_component);
24970        if matches!(version, MavlinkVersion::V2) {
24971            let len = __tmp.len();
24972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24973        } else {
24974            __tmp.len()
24975        }
24976    }
24977}
24978#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24979#[doc = "Control vehicle tone generation (buzzer)."]
24980#[doc = ""]
24981#[doc = "ID: 258"]
24982#[derive(Debug, Clone, PartialEq)]
24983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24985#[cfg_attr(feature = "ts", derive(TS))]
24986#[cfg_attr(feature = "ts", ts(export))]
24987pub struct PLAY_TUNE_DATA {
24988    #[doc = "System ID"]
24989    pub target_system: u8,
24990    #[doc = "Component ID"]
24991    pub target_component: u8,
24992    #[doc = "tune in board specific format"]
24993    #[cfg_attr(feature = "ts", ts(type = "string"))]
24994    pub tune: CharArray<30>,
24995    #[doc = "tune extension (appended to tune)"]
24996    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24997    #[cfg_attr(feature = "ts", ts(type = "string"))]
24998    pub tune2: CharArray<200>,
24999}
25000impl PLAY_TUNE_DATA {
25001    pub const ENCODED_LEN: usize = 232usize;
25002    pub const DEFAULT: Self = Self {
25003        target_system: 0_u8,
25004        target_component: 0_u8,
25005        tune: CharArray::new([0_u8; 30usize]),
25006        tune2: CharArray::new([0_u8; 200usize]),
25007    };
25008    #[cfg(feature = "arbitrary")]
25009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25010        use arbitrary::{Arbitrary, Unstructured};
25011        let mut buf = [0u8; 1024];
25012        rng.fill_bytes(&mut buf);
25013        let mut unstructured = Unstructured::new(&buf);
25014        Self::arbitrary(&mut unstructured).unwrap_or_default()
25015    }
25016}
25017impl Default for PLAY_TUNE_DATA {
25018    fn default() -> Self {
25019        Self::DEFAULT.clone()
25020    }
25021}
25022impl MessageData for PLAY_TUNE_DATA {
25023    type Message = MavMessage;
25024    const ID: u32 = 258u32;
25025    const NAME: &'static str = "PLAY_TUNE";
25026    const EXTRA_CRC: u8 = 187u8;
25027    const ENCODED_LEN: usize = 232usize;
25028    fn deser(
25029        _version: MavlinkVersion,
25030        __input: &[u8],
25031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25032        let avail_len = __input.len();
25033        let mut payload_buf = [0; Self::ENCODED_LEN];
25034        let mut buf = if avail_len < Self::ENCODED_LEN {
25035            payload_buf[0..avail_len].copy_from_slice(__input);
25036            Bytes::new(&payload_buf)
25037        } else {
25038            Bytes::new(__input)
25039        };
25040        let mut __struct = Self::default();
25041        __struct.target_system = buf.get_u8();
25042        __struct.target_component = buf.get_u8();
25043        let mut tmp = [0_u8; 30usize];
25044        for v in &mut tmp {
25045            *v = buf.get_u8();
25046        }
25047        __struct.tune = CharArray::new(tmp);
25048        let mut tmp = [0_u8; 200usize];
25049        for v in &mut tmp {
25050            *v = buf.get_u8();
25051        }
25052        __struct.tune2 = CharArray::new(tmp);
25053        Ok(__struct)
25054    }
25055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25056        let mut __tmp = BytesMut::new(bytes);
25057        #[allow(clippy::absurd_extreme_comparisons)]
25058        #[allow(unused_comparisons)]
25059        if __tmp.remaining() < Self::ENCODED_LEN {
25060            panic!(
25061                "buffer is too small (need {} bytes, but got {})",
25062                Self::ENCODED_LEN,
25063                __tmp.remaining(),
25064            )
25065        }
25066        __tmp.put_u8(self.target_system);
25067        __tmp.put_u8(self.target_component);
25068        for val in &self.tune {
25069            __tmp.put_u8(*val);
25070        }
25071        if matches!(version, MavlinkVersion::V2) {
25072            for val in &self.tune2 {
25073                __tmp.put_u8(*val);
25074            }
25075            let len = __tmp.len();
25076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25077        } else {
25078            __tmp.len()
25079        }
25080    }
25081}
25082#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25083#[doc = ""]
25084#[doc = "ID: 400"]
25085#[derive(Debug, Clone, PartialEq)]
25086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25088#[cfg_attr(feature = "ts", derive(TS))]
25089#[cfg_attr(feature = "ts", ts(export))]
25090pub struct PLAY_TUNE_V2_DATA {
25091    #[doc = "Tune format"]
25092    pub format: TuneFormat,
25093    #[doc = "System ID"]
25094    pub target_system: u8,
25095    #[doc = "Component ID"]
25096    pub target_component: u8,
25097    #[doc = "Tune definition as a NULL-terminated string."]
25098    #[cfg_attr(feature = "ts", ts(type = "string"))]
25099    pub tune: CharArray<248>,
25100}
25101impl PLAY_TUNE_V2_DATA {
25102    pub const ENCODED_LEN: usize = 254usize;
25103    pub const DEFAULT: Self = Self {
25104        format: TuneFormat::DEFAULT,
25105        target_system: 0_u8,
25106        target_component: 0_u8,
25107        tune: CharArray::new([0_u8; 248usize]),
25108    };
25109    #[cfg(feature = "arbitrary")]
25110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25111        use arbitrary::{Arbitrary, Unstructured};
25112        let mut buf = [0u8; 1024];
25113        rng.fill_bytes(&mut buf);
25114        let mut unstructured = Unstructured::new(&buf);
25115        Self::arbitrary(&mut unstructured).unwrap_or_default()
25116    }
25117}
25118impl Default for PLAY_TUNE_V2_DATA {
25119    fn default() -> Self {
25120        Self::DEFAULT.clone()
25121    }
25122}
25123impl MessageData for PLAY_TUNE_V2_DATA {
25124    type Message = MavMessage;
25125    const ID: u32 = 400u32;
25126    const NAME: &'static str = "PLAY_TUNE_V2";
25127    const EXTRA_CRC: u8 = 110u8;
25128    const ENCODED_LEN: usize = 254usize;
25129    fn deser(
25130        _version: MavlinkVersion,
25131        __input: &[u8],
25132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25133        let avail_len = __input.len();
25134        let mut payload_buf = [0; Self::ENCODED_LEN];
25135        let mut buf = if avail_len < Self::ENCODED_LEN {
25136            payload_buf[0..avail_len].copy_from_slice(__input);
25137            Bytes::new(&payload_buf)
25138        } else {
25139            Bytes::new(__input)
25140        };
25141        let mut __struct = Self::default();
25142        let tmp = buf.get_u32_le();
25143        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25144            ::mavlink_core::error::ParserError::InvalidEnum {
25145                enum_type: "TuneFormat",
25146                value: tmp as u64,
25147            },
25148        )?;
25149        __struct.target_system = buf.get_u8();
25150        __struct.target_component = buf.get_u8();
25151        let mut tmp = [0_u8; 248usize];
25152        for v in &mut tmp {
25153            *v = buf.get_u8();
25154        }
25155        __struct.tune = CharArray::new(tmp);
25156        Ok(__struct)
25157    }
25158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25159        let mut __tmp = BytesMut::new(bytes);
25160        #[allow(clippy::absurd_extreme_comparisons)]
25161        #[allow(unused_comparisons)]
25162        if __tmp.remaining() < Self::ENCODED_LEN {
25163            panic!(
25164                "buffer is too small (need {} bytes, but got {})",
25165                Self::ENCODED_LEN,
25166                __tmp.remaining(),
25167            )
25168        }
25169        __tmp.put_u32_le(self.format as u32);
25170        __tmp.put_u8(self.target_system);
25171        __tmp.put_u8(self.target_component);
25172        for val in &self.tune {
25173            __tmp.put_u8(*val);
25174        }
25175        if matches!(version, MavlinkVersion::V2) {
25176            let len = __tmp.len();
25177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25178        } else {
25179            __tmp.len()
25180        }
25181    }
25182}
25183#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25184#[doc = ""]
25185#[doc = "ID: 87"]
25186#[derive(Debug, Clone, PartialEq)]
25187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25189#[cfg_attr(feature = "ts", derive(TS))]
25190#[cfg_attr(feature = "ts", ts(export))]
25191pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25192    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25193    pub time_boot_ms: u32,
25194    #[doc = "Latitude in WGS84 frame"]
25195    pub lat_int: i32,
25196    #[doc = "Longitude in WGS84 frame"]
25197    pub lon_int: i32,
25198    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25199    pub alt: f32,
25200    #[doc = "X velocity in NED frame"]
25201    pub vx: f32,
25202    #[doc = "Y velocity in NED frame"]
25203    pub vy: f32,
25204    #[doc = "Z velocity in NED frame"]
25205    pub vz: f32,
25206    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25207    pub afx: f32,
25208    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25209    pub afy: f32,
25210    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25211    pub afz: f32,
25212    #[doc = "yaw setpoint"]
25213    pub yaw: f32,
25214    #[doc = "yaw rate setpoint"]
25215    pub yaw_rate: f32,
25216    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25217    pub type_mask: PositionTargetTypemask,
25218    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25219    pub coordinate_frame: MavFrame,
25220}
25221impl POSITION_TARGET_GLOBAL_INT_DATA {
25222    pub const ENCODED_LEN: usize = 51usize;
25223    pub const DEFAULT: Self = Self {
25224        time_boot_ms: 0_u32,
25225        lat_int: 0_i32,
25226        lon_int: 0_i32,
25227        alt: 0.0_f32,
25228        vx: 0.0_f32,
25229        vy: 0.0_f32,
25230        vz: 0.0_f32,
25231        afx: 0.0_f32,
25232        afy: 0.0_f32,
25233        afz: 0.0_f32,
25234        yaw: 0.0_f32,
25235        yaw_rate: 0.0_f32,
25236        type_mask: PositionTargetTypemask::DEFAULT,
25237        coordinate_frame: MavFrame::DEFAULT,
25238    };
25239    #[cfg(feature = "arbitrary")]
25240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25241        use arbitrary::{Arbitrary, Unstructured};
25242        let mut buf = [0u8; 1024];
25243        rng.fill_bytes(&mut buf);
25244        let mut unstructured = Unstructured::new(&buf);
25245        Self::arbitrary(&mut unstructured).unwrap_or_default()
25246    }
25247}
25248impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25249    fn default() -> Self {
25250        Self::DEFAULT.clone()
25251    }
25252}
25253impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25254    type Message = MavMessage;
25255    const ID: u32 = 87u32;
25256    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25257    const EXTRA_CRC: u8 = 150u8;
25258    const ENCODED_LEN: usize = 51usize;
25259    fn deser(
25260        _version: MavlinkVersion,
25261        __input: &[u8],
25262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25263        let avail_len = __input.len();
25264        let mut payload_buf = [0; Self::ENCODED_LEN];
25265        let mut buf = if avail_len < Self::ENCODED_LEN {
25266            payload_buf[0..avail_len].copy_from_slice(__input);
25267            Bytes::new(&payload_buf)
25268        } else {
25269            Bytes::new(__input)
25270        };
25271        let mut __struct = Self::default();
25272        __struct.time_boot_ms = buf.get_u32_le();
25273        __struct.lat_int = buf.get_i32_le();
25274        __struct.lon_int = buf.get_i32_le();
25275        __struct.alt = buf.get_f32_le();
25276        __struct.vx = buf.get_f32_le();
25277        __struct.vy = buf.get_f32_le();
25278        __struct.vz = buf.get_f32_le();
25279        __struct.afx = buf.get_f32_le();
25280        __struct.afy = buf.get_f32_le();
25281        __struct.afz = buf.get_f32_le();
25282        __struct.yaw = buf.get_f32_le();
25283        __struct.yaw_rate = buf.get_f32_le();
25284        let tmp = buf.get_u16_le();
25285        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25286            ::mavlink_core::error::ParserError::InvalidFlag {
25287                flag_type: "PositionTargetTypemask",
25288                value: tmp as u64,
25289            },
25290        )?;
25291        let tmp = buf.get_u8();
25292        __struct.coordinate_frame =
25293            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25294                enum_type: "MavFrame",
25295                value: tmp as u64,
25296            })?;
25297        Ok(__struct)
25298    }
25299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25300        let mut __tmp = BytesMut::new(bytes);
25301        #[allow(clippy::absurd_extreme_comparisons)]
25302        #[allow(unused_comparisons)]
25303        if __tmp.remaining() < Self::ENCODED_LEN {
25304            panic!(
25305                "buffer is too small (need {} bytes, but got {})",
25306                Self::ENCODED_LEN,
25307                __tmp.remaining(),
25308            )
25309        }
25310        __tmp.put_u32_le(self.time_boot_ms);
25311        __tmp.put_i32_le(self.lat_int);
25312        __tmp.put_i32_le(self.lon_int);
25313        __tmp.put_f32_le(self.alt);
25314        __tmp.put_f32_le(self.vx);
25315        __tmp.put_f32_le(self.vy);
25316        __tmp.put_f32_le(self.vz);
25317        __tmp.put_f32_le(self.afx);
25318        __tmp.put_f32_le(self.afy);
25319        __tmp.put_f32_le(self.afz);
25320        __tmp.put_f32_le(self.yaw);
25321        __tmp.put_f32_le(self.yaw_rate);
25322        __tmp.put_u16_le(self.type_mask.bits());
25323        __tmp.put_u8(self.coordinate_frame as u8);
25324        if matches!(version, MavlinkVersion::V2) {
25325            let len = __tmp.len();
25326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25327        } else {
25328            __tmp.len()
25329        }
25330    }
25331}
25332#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25333#[doc = ""]
25334#[doc = "ID: 85"]
25335#[derive(Debug, Clone, PartialEq)]
25336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25338#[cfg_attr(feature = "ts", derive(TS))]
25339#[cfg_attr(feature = "ts", ts(export))]
25340pub struct POSITION_TARGET_LOCAL_NED_DATA {
25341    #[doc = "Timestamp (time since system boot)."]
25342    pub time_boot_ms: u32,
25343    #[doc = "X Position in NED frame"]
25344    pub x: f32,
25345    #[doc = "Y Position in NED frame"]
25346    pub y: f32,
25347    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25348    pub z: f32,
25349    #[doc = "X velocity in NED frame"]
25350    pub vx: f32,
25351    #[doc = "Y velocity in NED frame"]
25352    pub vy: f32,
25353    #[doc = "Z velocity in NED frame"]
25354    pub vz: f32,
25355    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25356    pub afx: f32,
25357    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25358    pub afy: f32,
25359    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25360    pub afz: f32,
25361    #[doc = "yaw setpoint"]
25362    pub yaw: f32,
25363    #[doc = "yaw rate setpoint"]
25364    pub yaw_rate: f32,
25365    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25366    pub type_mask: PositionTargetTypemask,
25367    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25368    pub coordinate_frame: MavFrame,
25369}
25370impl POSITION_TARGET_LOCAL_NED_DATA {
25371    pub const ENCODED_LEN: usize = 51usize;
25372    pub const DEFAULT: Self = Self {
25373        time_boot_ms: 0_u32,
25374        x: 0.0_f32,
25375        y: 0.0_f32,
25376        z: 0.0_f32,
25377        vx: 0.0_f32,
25378        vy: 0.0_f32,
25379        vz: 0.0_f32,
25380        afx: 0.0_f32,
25381        afy: 0.0_f32,
25382        afz: 0.0_f32,
25383        yaw: 0.0_f32,
25384        yaw_rate: 0.0_f32,
25385        type_mask: PositionTargetTypemask::DEFAULT,
25386        coordinate_frame: MavFrame::DEFAULT,
25387    };
25388    #[cfg(feature = "arbitrary")]
25389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25390        use arbitrary::{Arbitrary, Unstructured};
25391        let mut buf = [0u8; 1024];
25392        rng.fill_bytes(&mut buf);
25393        let mut unstructured = Unstructured::new(&buf);
25394        Self::arbitrary(&mut unstructured).unwrap_or_default()
25395    }
25396}
25397impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25398    fn default() -> Self {
25399        Self::DEFAULT.clone()
25400    }
25401}
25402impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25403    type Message = MavMessage;
25404    const ID: u32 = 85u32;
25405    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25406    const EXTRA_CRC: u8 = 140u8;
25407    const ENCODED_LEN: usize = 51usize;
25408    fn deser(
25409        _version: MavlinkVersion,
25410        __input: &[u8],
25411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25412        let avail_len = __input.len();
25413        let mut payload_buf = [0; Self::ENCODED_LEN];
25414        let mut buf = if avail_len < Self::ENCODED_LEN {
25415            payload_buf[0..avail_len].copy_from_slice(__input);
25416            Bytes::new(&payload_buf)
25417        } else {
25418            Bytes::new(__input)
25419        };
25420        let mut __struct = Self::default();
25421        __struct.time_boot_ms = buf.get_u32_le();
25422        __struct.x = buf.get_f32_le();
25423        __struct.y = buf.get_f32_le();
25424        __struct.z = buf.get_f32_le();
25425        __struct.vx = buf.get_f32_le();
25426        __struct.vy = buf.get_f32_le();
25427        __struct.vz = buf.get_f32_le();
25428        __struct.afx = buf.get_f32_le();
25429        __struct.afy = buf.get_f32_le();
25430        __struct.afz = buf.get_f32_le();
25431        __struct.yaw = buf.get_f32_le();
25432        __struct.yaw_rate = buf.get_f32_le();
25433        let tmp = buf.get_u16_le();
25434        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25435            ::mavlink_core::error::ParserError::InvalidFlag {
25436                flag_type: "PositionTargetTypemask",
25437                value: tmp as u64,
25438            },
25439        )?;
25440        let tmp = buf.get_u8();
25441        __struct.coordinate_frame =
25442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25443                enum_type: "MavFrame",
25444                value: tmp as u64,
25445            })?;
25446        Ok(__struct)
25447    }
25448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25449        let mut __tmp = BytesMut::new(bytes);
25450        #[allow(clippy::absurd_extreme_comparisons)]
25451        #[allow(unused_comparisons)]
25452        if __tmp.remaining() < Self::ENCODED_LEN {
25453            panic!(
25454                "buffer is too small (need {} bytes, but got {})",
25455                Self::ENCODED_LEN,
25456                __tmp.remaining(),
25457            )
25458        }
25459        __tmp.put_u32_le(self.time_boot_ms);
25460        __tmp.put_f32_le(self.x);
25461        __tmp.put_f32_le(self.y);
25462        __tmp.put_f32_le(self.z);
25463        __tmp.put_f32_le(self.vx);
25464        __tmp.put_f32_le(self.vy);
25465        __tmp.put_f32_le(self.vz);
25466        __tmp.put_f32_le(self.afx);
25467        __tmp.put_f32_le(self.afy);
25468        __tmp.put_f32_le(self.afz);
25469        __tmp.put_f32_le(self.yaw);
25470        __tmp.put_f32_le(self.yaw_rate);
25471        __tmp.put_u16_le(self.type_mask.bits());
25472        __tmp.put_u8(self.coordinate_frame as u8);
25473        if matches!(version, MavlinkVersion::V2) {
25474            let len = __tmp.len();
25475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25476        } else {
25477            __tmp.len()
25478        }
25479    }
25480}
25481#[doc = "Power supply status."]
25482#[doc = ""]
25483#[doc = "ID: 125"]
25484#[derive(Debug, Clone, PartialEq)]
25485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25487#[cfg_attr(feature = "ts", derive(TS))]
25488#[cfg_attr(feature = "ts", ts(export))]
25489pub struct POWER_STATUS_DATA {
25490    #[doc = "5V rail voltage."]
25491    pub Vcc: u16,
25492    #[doc = "Servo rail voltage."]
25493    pub Vservo: u16,
25494    #[doc = "Bitmap of power supply status flags."]
25495    pub flags: MavPowerStatus,
25496}
25497impl POWER_STATUS_DATA {
25498    pub const ENCODED_LEN: usize = 6usize;
25499    pub const DEFAULT: Self = Self {
25500        Vcc: 0_u16,
25501        Vservo: 0_u16,
25502        flags: MavPowerStatus::DEFAULT,
25503    };
25504    #[cfg(feature = "arbitrary")]
25505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25506        use arbitrary::{Arbitrary, Unstructured};
25507        let mut buf = [0u8; 1024];
25508        rng.fill_bytes(&mut buf);
25509        let mut unstructured = Unstructured::new(&buf);
25510        Self::arbitrary(&mut unstructured).unwrap_or_default()
25511    }
25512}
25513impl Default for POWER_STATUS_DATA {
25514    fn default() -> Self {
25515        Self::DEFAULT.clone()
25516    }
25517}
25518impl MessageData for POWER_STATUS_DATA {
25519    type Message = MavMessage;
25520    const ID: u32 = 125u32;
25521    const NAME: &'static str = "POWER_STATUS";
25522    const EXTRA_CRC: u8 = 203u8;
25523    const ENCODED_LEN: usize = 6usize;
25524    fn deser(
25525        _version: MavlinkVersion,
25526        __input: &[u8],
25527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25528        let avail_len = __input.len();
25529        let mut payload_buf = [0; Self::ENCODED_LEN];
25530        let mut buf = if avail_len < Self::ENCODED_LEN {
25531            payload_buf[0..avail_len].copy_from_slice(__input);
25532            Bytes::new(&payload_buf)
25533        } else {
25534            Bytes::new(__input)
25535        };
25536        let mut __struct = Self::default();
25537        __struct.Vcc = buf.get_u16_le();
25538        __struct.Vservo = buf.get_u16_le();
25539        let tmp = buf.get_u16_le();
25540        __struct.flags = MavPowerStatus::from_bits(tmp).ok_or(
25541            ::mavlink_core::error::ParserError::InvalidFlag {
25542                flag_type: "MavPowerStatus",
25543                value: tmp as u64,
25544            },
25545        )?;
25546        Ok(__struct)
25547    }
25548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25549        let mut __tmp = BytesMut::new(bytes);
25550        #[allow(clippy::absurd_extreme_comparisons)]
25551        #[allow(unused_comparisons)]
25552        if __tmp.remaining() < Self::ENCODED_LEN {
25553            panic!(
25554                "buffer is too small (need {} bytes, but got {})",
25555                Self::ENCODED_LEN,
25556                __tmp.remaining(),
25557            )
25558        }
25559        __tmp.put_u16_le(self.Vcc);
25560        __tmp.put_u16_le(self.Vservo);
25561        __tmp.put_u16_le(self.flags.bits());
25562        if matches!(version, MavlinkVersion::V2) {
25563            let len = __tmp.len();
25564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25565        } else {
25566            __tmp.len()
25567        }
25568    }
25569}
25570#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25571#[doc = ""]
25572#[doc = "ID: 300"]
25573#[derive(Debug, Clone, PartialEq)]
25574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25576#[cfg_attr(feature = "ts", derive(TS))]
25577#[cfg_attr(feature = "ts", ts(export))]
25578pub struct PROTOCOL_VERSION_DATA {
25579    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25580    pub version: u16,
25581    #[doc = "Minimum MAVLink version supported"]
25582    pub min_version: u16,
25583    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25584    pub max_version: u16,
25585    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25587    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25588    pub spec_version_hash: [u8; 8],
25589    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25592    pub library_version_hash: [u8; 8],
25593}
25594impl PROTOCOL_VERSION_DATA {
25595    pub const ENCODED_LEN: usize = 22usize;
25596    pub const DEFAULT: Self = Self {
25597        version: 0_u16,
25598        min_version: 0_u16,
25599        max_version: 0_u16,
25600        spec_version_hash: [0_u8; 8usize],
25601        library_version_hash: [0_u8; 8usize],
25602    };
25603    #[cfg(feature = "arbitrary")]
25604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25605        use arbitrary::{Arbitrary, Unstructured};
25606        let mut buf = [0u8; 1024];
25607        rng.fill_bytes(&mut buf);
25608        let mut unstructured = Unstructured::new(&buf);
25609        Self::arbitrary(&mut unstructured).unwrap_or_default()
25610    }
25611}
25612impl Default for PROTOCOL_VERSION_DATA {
25613    fn default() -> Self {
25614        Self::DEFAULT.clone()
25615    }
25616}
25617impl MessageData for PROTOCOL_VERSION_DATA {
25618    type Message = MavMessage;
25619    const ID: u32 = 300u32;
25620    const NAME: &'static str = "PROTOCOL_VERSION";
25621    const EXTRA_CRC: u8 = 217u8;
25622    const ENCODED_LEN: usize = 22usize;
25623    fn deser(
25624        _version: MavlinkVersion,
25625        __input: &[u8],
25626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25627        let avail_len = __input.len();
25628        let mut payload_buf = [0; Self::ENCODED_LEN];
25629        let mut buf = if avail_len < Self::ENCODED_LEN {
25630            payload_buf[0..avail_len].copy_from_slice(__input);
25631            Bytes::new(&payload_buf)
25632        } else {
25633            Bytes::new(__input)
25634        };
25635        let mut __struct = Self::default();
25636        __struct.version = buf.get_u16_le();
25637        __struct.min_version = buf.get_u16_le();
25638        __struct.max_version = buf.get_u16_le();
25639        for v in &mut __struct.spec_version_hash {
25640            let val = buf.get_u8();
25641            *v = val;
25642        }
25643        for v in &mut __struct.library_version_hash {
25644            let val = buf.get_u8();
25645            *v = val;
25646        }
25647        Ok(__struct)
25648    }
25649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25650        let mut __tmp = BytesMut::new(bytes);
25651        #[allow(clippy::absurd_extreme_comparisons)]
25652        #[allow(unused_comparisons)]
25653        if __tmp.remaining() < Self::ENCODED_LEN {
25654            panic!(
25655                "buffer is too small (need {} bytes, but got {})",
25656                Self::ENCODED_LEN,
25657                __tmp.remaining(),
25658            )
25659        }
25660        __tmp.put_u16_le(self.version);
25661        __tmp.put_u16_le(self.min_version);
25662        __tmp.put_u16_le(self.max_version);
25663        for val in &self.spec_version_hash {
25664            __tmp.put_u8(*val);
25665        }
25666        for val in &self.library_version_hash {
25667            __tmp.put_u8(*val);
25668        }
25669        if matches!(version, MavlinkVersion::V2) {
25670            let len = __tmp.len();
25671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25672        } else {
25673            __tmp.len()
25674        }
25675    }
25676}
25677#[doc = "Status generated by radio and injected into MAVLink stream."]
25678#[doc = ""]
25679#[doc = "ID: 109"]
25680#[derive(Debug, Clone, PartialEq)]
25681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25683#[cfg_attr(feature = "ts", derive(TS))]
25684#[cfg_attr(feature = "ts", ts(export))]
25685pub struct RADIO_STATUS_DATA {
25686    #[doc = "Count of radio packet receive errors (since boot)."]
25687    pub rxerrors: u16,
25688    #[doc = "Count of error corrected radio packets (since boot)."]
25689    pub fixed: u16,
25690    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25691    pub rssi: u8,
25692    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25693    pub remrssi: u8,
25694    #[doc = "Remaining free transmitter buffer space."]
25695    pub txbuf: u8,
25696    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25697    pub noise: u8,
25698    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25699    pub remnoise: u8,
25700}
25701impl RADIO_STATUS_DATA {
25702    pub const ENCODED_LEN: usize = 9usize;
25703    pub const DEFAULT: Self = Self {
25704        rxerrors: 0_u16,
25705        fixed: 0_u16,
25706        rssi: 0_u8,
25707        remrssi: 0_u8,
25708        txbuf: 0_u8,
25709        noise: 0_u8,
25710        remnoise: 0_u8,
25711    };
25712    #[cfg(feature = "arbitrary")]
25713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25714        use arbitrary::{Arbitrary, Unstructured};
25715        let mut buf = [0u8; 1024];
25716        rng.fill_bytes(&mut buf);
25717        let mut unstructured = Unstructured::new(&buf);
25718        Self::arbitrary(&mut unstructured).unwrap_or_default()
25719    }
25720}
25721impl Default for RADIO_STATUS_DATA {
25722    fn default() -> Self {
25723        Self::DEFAULT.clone()
25724    }
25725}
25726impl MessageData for RADIO_STATUS_DATA {
25727    type Message = MavMessage;
25728    const ID: u32 = 109u32;
25729    const NAME: &'static str = "RADIO_STATUS";
25730    const EXTRA_CRC: u8 = 185u8;
25731    const ENCODED_LEN: usize = 9usize;
25732    fn deser(
25733        _version: MavlinkVersion,
25734        __input: &[u8],
25735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25736        let avail_len = __input.len();
25737        let mut payload_buf = [0; Self::ENCODED_LEN];
25738        let mut buf = if avail_len < Self::ENCODED_LEN {
25739            payload_buf[0..avail_len].copy_from_slice(__input);
25740            Bytes::new(&payload_buf)
25741        } else {
25742            Bytes::new(__input)
25743        };
25744        let mut __struct = Self::default();
25745        __struct.rxerrors = buf.get_u16_le();
25746        __struct.fixed = buf.get_u16_le();
25747        __struct.rssi = buf.get_u8();
25748        __struct.remrssi = buf.get_u8();
25749        __struct.txbuf = buf.get_u8();
25750        __struct.noise = buf.get_u8();
25751        __struct.remnoise = buf.get_u8();
25752        Ok(__struct)
25753    }
25754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25755        let mut __tmp = BytesMut::new(bytes);
25756        #[allow(clippy::absurd_extreme_comparisons)]
25757        #[allow(unused_comparisons)]
25758        if __tmp.remaining() < Self::ENCODED_LEN {
25759            panic!(
25760                "buffer is too small (need {} bytes, but got {})",
25761                Self::ENCODED_LEN,
25762                __tmp.remaining(),
25763            )
25764        }
25765        __tmp.put_u16_le(self.rxerrors);
25766        __tmp.put_u16_le(self.fixed);
25767        __tmp.put_u8(self.rssi);
25768        __tmp.put_u8(self.remrssi);
25769        __tmp.put_u8(self.txbuf);
25770        __tmp.put_u8(self.noise);
25771        __tmp.put_u8(self.remnoise);
25772        if matches!(version, MavlinkVersion::V2) {
25773            let len = __tmp.len();
25774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25775        } else {
25776            __tmp.len()
25777        }
25778    }
25779}
25780#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25781#[doc = ""]
25782#[doc = "ID: 27"]
25783#[derive(Debug, Clone, PartialEq)]
25784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25786#[cfg_attr(feature = "ts", derive(TS))]
25787#[cfg_attr(feature = "ts", ts(export))]
25788pub struct RAW_IMU_DATA {
25789    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25790    pub time_usec: u64,
25791    #[doc = "X acceleration (raw)"]
25792    pub xacc: i16,
25793    #[doc = "Y acceleration (raw)"]
25794    pub yacc: i16,
25795    #[doc = "Z acceleration (raw)"]
25796    pub zacc: i16,
25797    #[doc = "Angular speed around X axis (raw)"]
25798    pub xgyro: i16,
25799    #[doc = "Angular speed around Y axis (raw)"]
25800    pub ygyro: i16,
25801    #[doc = "Angular speed around Z axis (raw)"]
25802    pub zgyro: i16,
25803    #[doc = "X Magnetic field (raw)"]
25804    pub xmag: i16,
25805    #[doc = "Y Magnetic field (raw)"]
25806    pub ymag: i16,
25807    #[doc = "Z Magnetic field (raw)"]
25808    pub zmag: i16,
25809    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25811    pub id: u8,
25812    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25814    pub temperature: i16,
25815}
25816impl RAW_IMU_DATA {
25817    pub const ENCODED_LEN: usize = 29usize;
25818    pub const DEFAULT: Self = Self {
25819        time_usec: 0_u64,
25820        xacc: 0_i16,
25821        yacc: 0_i16,
25822        zacc: 0_i16,
25823        xgyro: 0_i16,
25824        ygyro: 0_i16,
25825        zgyro: 0_i16,
25826        xmag: 0_i16,
25827        ymag: 0_i16,
25828        zmag: 0_i16,
25829        id: 0_u8,
25830        temperature: 0_i16,
25831    };
25832    #[cfg(feature = "arbitrary")]
25833    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25834        use arbitrary::{Arbitrary, Unstructured};
25835        let mut buf = [0u8; 1024];
25836        rng.fill_bytes(&mut buf);
25837        let mut unstructured = Unstructured::new(&buf);
25838        Self::arbitrary(&mut unstructured).unwrap_or_default()
25839    }
25840}
25841impl Default for RAW_IMU_DATA {
25842    fn default() -> Self {
25843        Self::DEFAULT.clone()
25844    }
25845}
25846impl MessageData for RAW_IMU_DATA {
25847    type Message = MavMessage;
25848    const ID: u32 = 27u32;
25849    const NAME: &'static str = "RAW_IMU";
25850    const EXTRA_CRC: u8 = 144u8;
25851    const ENCODED_LEN: usize = 29usize;
25852    fn deser(
25853        _version: MavlinkVersion,
25854        __input: &[u8],
25855    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25856        let avail_len = __input.len();
25857        let mut payload_buf = [0; Self::ENCODED_LEN];
25858        let mut buf = if avail_len < Self::ENCODED_LEN {
25859            payload_buf[0..avail_len].copy_from_slice(__input);
25860            Bytes::new(&payload_buf)
25861        } else {
25862            Bytes::new(__input)
25863        };
25864        let mut __struct = Self::default();
25865        __struct.time_usec = buf.get_u64_le();
25866        __struct.xacc = buf.get_i16_le();
25867        __struct.yacc = buf.get_i16_le();
25868        __struct.zacc = buf.get_i16_le();
25869        __struct.xgyro = buf.get_i16_le();
25870        __struct.ygyro = buf.get_i16_le();
25871        __struct.zgyro = buf.get_i16_le();
25872        __struct.xmag = buf.get_i16_le();
25873        __struct.ymag = buf.get_i16_le();
25874        __struct.zmag = buf.get_i16_le();
25875        __struct.id = buf.get_u8();
25876        __struct.temperature = buf.get_i16_le();
25877        Ok(__struct)
25878    }
25879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25880        let mut __tmp = BytesMut::new(bytes);
25881        #[allow(clippy::absurd_extreme_comparisons)]
25882        #[allow(unused_comparisons)]
25883        if __tmp.remaining() < Self::ENCODED_LEN {
25884            panic!(
25885                "buffer is too small (need {} bytes, but got {})",
25886                Self::ENCODED_LEN,
25887                __tmp.remaining(),
25888            )
25889        }
25890        __tmp.put_u64_le(self.time_usec);
25891        __tmp.put_i16_le(self.xacc);
25892        __tmp.put_i16_le(self.yacc);
25893        __tmp.put_i16_le(self.zacc);
25894        __tmp.put_i16_le(self.xgyro);
25895        __tmp.put_i16_le(self.ygyro);
25896        __tmp.put_i16_le(self.zgyro);
25897        __tmp.put_i16_le(self.xmag);
25898        __tmp.put_i16_le(self.ymag);
25899        __tmp.put_i16_le(self.zmag);
25900        if matches!(version, MavlinkVersion::V2) {
25901            __tmp.put_u8(self.id);
25902            __tmp.put_i16_le(self.temperature);
25903            let len = __tmp.len();
25904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25905        } else {
25906            __tmp.len()
25907        }
25908    }
25909}
25910#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25911#[doc = ""]
25912#[doc = "ID: 28"]
25913#[derive(Debug, Clone, PartialEq)]
25914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25916#[cfg_attr(feature = "ts", derive(TS))]
25917#[cfg_attr(feature = "ts", ts(export))]
25918pub struct RAW_PRESSURE_DATA {
25919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25920    pub time_usec: u64,
25921    #[doc = "Absolute pressure (raw)"]
25922    pub press_abs: i16,
25923    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25924    pub press_diff1: i16,
25925    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25926    pub press_diff2: i16,
25927    #[doc = "Raw Temperature measurement (raw)"]
25928    pub temperature: i16,
25929}
25930impl RAW_PRESSURE_DATA {
25931    pub const ENCODED_LEN: usize = 16usize;
25932    pub const DEFAULT: Self = Self {
25933        time_usec: 0_u64,
25934        press_abs: 0_i16,
25935        press_diff1: 0_i16,
25936        press_diff2: 0_i16,
25937        temperature: 0_i16,
25938    };
25939    #[cfg(feature = "arbitrary")]
25940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25941        use arbitrary::{Arbitrary, Unstructured};
25942        let mut buf = [0u8; 1024];
25943        rng.fill_bytes(&mut buf);
25944        let mut unstructured = Unstructured::new(&buf);
25945        Self::arbitrary(&mut unstructured).unwrap_or_default()
25946    }
25947}
25948impl Default for RAW_PRESSURE_DATA {
25949    fn default() -> Self {
25950        Self::DEFAULT.clone()
25951    }
25952}
25953impl MessageData for RAW_PRESSURE_DATA {
25954    type Message = MavMessage;
25955    const ID: u32 = 28u32;
25956    const NAME: &'static str = "RAW_PRESSURE";
25957    const EXTRA_CRC: u8 = 67u8;
25958    const ENCODED_LEN: usize = 16usize;
25959    fn deser(
25960        _version: MavlinkVersion,
25961        __input: &[u8],
25962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25963        let avail_len = __input.len();
25964        let mut payload_buf = [0; Self::ENCODED_LEN];
25965        let mut buf = if avail_len < Self::ENCODED_LEN {
25966            payload_buf[0..avail_len].copy_from_slice(__input);
25967            Bytes::new(&payload_buf)
25968        } else {
25969            Bytes::new(__input)
25970        };
25971        let mut __struct = Self::default();
25972        __struct.time_usec = buf.get_u64_le();
25973        __struct.press_abs = buf.get_i16_le();
25974        __struct.press_diff1 = buf.get_i16_le();
25975        __struct.press_diff2 = buf.get_i16_le();
25976        __struct.temperature = buf.get_i16_le();
25977        Ok(__struct)
25978    }
25979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25980        let mut __tmp = BytesMut::new(bytes);
25981        #[allow(clippy::absurd_extreme_comparisons)]
25982        #[allow(unused_comparisons)]
25983        if __tmp.remaining() < Self::ENCODED_LEN {
25984            panic!(
25985                "buffer is too small (need {} bytes, but got {})",
25986                Self::ENCODED_LEN,
25987                __tmp.remaining(),
25988            )
25989        }
25990        __tmp.put_u64_le(self.time_usec);
25991        __tmp.put_i16_le(self.press_abs);
25992        __tmp.put_i16_le(self.press_diff1);
25993        __tmp.put_i16_le(self.press_diff2);
25994        __tmp.put_i16_le(self.temperature);
25995        if matches!(version, MavlinkVersion::V2) {
25996            let len = __tmp.len();
25997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25998        } else {
25999            __tmp.len()
26000        }
26001    }
26002}
26003#[doc = "RPM sensor data message."]
26004#[doc = ""]
26005#[doc = "ID: 339"]
26006#[derive(Debug, Clone, PartialEq)]
26007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26009#[cfg_attr(feature = "ts", derive(TS))]
26010#[cfg_attr(feature = "ts", ts(export))]
26011pub struct RAW_RPM_DATA {
26012    #[doc = "Indicated rate"]
26013    pub frequency: f32,
26014    #[doc = "Index of this RPM sensor (0-indexed)"]
26015    pub index: u8,
26016}
26017impl RAW_RPM_DATA {
26018    pub const ENCODED_LEN: usize = 5usize;
26019    pub const DEFAULT: Self = Self {
26020        frequency: 0.0_f32,
26021        index: 0_u8,
26022    };
26023    #[cfg(feature = "arbitrary")]
26024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26025        use arbitrary::{Arbitrary, Unstructured};
26026        let mut buf = [0u8; 1024];
26027        rng.fill_bytes(&mut buf);
26028        let mut unstructured = Unstructured::new(&buf);
26029        Self::arbitrary(&mut unstructured).unwrap_or_default()
26030    }
26031}
26032impl Default for RAW_RPM_DATA {
26033    fn default() -> Self {
26034        Self::DEFAULT.clone()
26035    }
26036}
26037impl MessageData for RAW_RPM_DATA {
26038    type Message = MavMessage;
26039    const ID: u32 = 339u32;
26040    const NAME: &'static str = "RAW_RPM";
26041    const EXTRA_CRC: u8 = 199u8;
26042    const ENCODED_LEN: usize = 5usize;
26043    fn deser(
26044        _version: MavlinkVersion,
26045        __input: &[u8],
26046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26047        let avail_len = __input.len();
26048        let mut payload_buf = [0; Self::ENCODED_LEN];
26049        let mut buf = if avail_len < Self::ENCODED_LEN {
26050            payload_buf[0..avail_len].copy_from_slice(__input);
26051            Bytes::new(&payload_buf)
26052        } else {
26053            Bytes::new(__input)
26054        };
26055        let mut __struct = Self::default();
26056        __struct.frequency = buf.get_f32_le();
26057        __struct.index = buf.get_u8();
26058        Ok(__struct)
26059    }
26060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26061        let mut __tmp = BytesMut::new(bytes);
26062        #[allow(clippy::absurd_extreme_comparisons)]
26063        #[allow(unused_comparisons)]
26064        if __tmp.remaining() < Self::ENCODED_LEN {
26065            panic!(
26066                "buffer is too small (need {} bytes, but got {})",
26067                Self::ENCODED_LEN,
26068                __tmp.remaining(),
26069            )
26070        }
26071        __tmp.put_f32_le(self.frequency);
26072        __tmp.put_u8(self.index);
26073        if matches!(version, MavlinkVersion::V2) {
26074            let len = __tmp.len();
26075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26076        } else {
26077            __tmp.len()
26078        }
26079    }
26080}
26081#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26082#[doc = ""]
26083#[doc = "ID: 65"]
26084#[derive(Debug, Clone, PartialEq)]
26085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26087#[cfg_attr(feature = "ts", derive(TS))]
26088#[cfg_attr(feature = "ts", ts(export))]
26089pub struct RC_CHANNELS_DATA {
26090    #[doc = "Timestamp (time since system boot)."]
26091    pub time_boot_ms: u32,
26092    #[doc = "RC channel 1 value."]
26093    pub chan1_raw: u16,
26094    #[doc = "RC channel 2 value."]
26095    pub chan2_raw: u16,
26096    #[doc = "RC channel 3 value."]
26097    pub chan3_raw: u16,
26098    #[doc = "RC channel 4 value."]
26099    pub chan4_raw: u16,
26100    #[doc = "RC channel 5 value."]
26101    pub chan5_raw: u16,
26102    #[doc = "RC channel 6 value."]
26103    pub chan6_raw: u16,
26104    #[doc = "RC channel 7 value."]
26105    pub chan7_raw: u16,
26106    #[doc = "RC channel 8 value."]
26107    pub chan8_raw: u16,
26108    #[doc = "RC channel 9 value."]
26109    pub chan9_raw: u16,
26110    #[doc = "RC channel 10 value."]
26111    pub chan10_raw: u16,
26112    #[doc = "RC channel 11 value."]
26113    pub chan11_raw: u16,
26114    #[doc = "RC channel 12 value."]
26115    pub chan12_raw: u16,
26116    #[doc = "RC channel 13 value."]
26117    pub chan13_raw: u16,
26118    #[doc = "RC channel 14 value."]
26119    pub chan14_raw: u16,
26120    #[doc = "RC channel 15 value."]
26121    pub chan15_raw: u16,
26122    #[doc = "RC channel 16 value."]
26123    pub chan16_raw: u16,
26124    #[doc = "RC channel 17 value."]
26125    pub chan17_raw: u16,
26126    #[doc = "RC channel 18 value."]
26127    pub chan18_raw: u16,
26128    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26129    pub chancount: u8,
26130    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26131    pub rssi: u8,
26132}
26133impl RC_CHANNELS_DATA {
26134    pub const ENCODED_LEN: usize = 42usize;
26135    pub const DEFAULT: Self = Self {
26136        time_boot_ms: 0_u32,
26137        chan1_raw: 0_u16,
26138        chan2_raw: 0_u16,
26139        chan3_raw: 0_u16,
26140        chan4_raw: 0_u16,
26141        chan5_raw: 0_u16,
26142        chan6_raw: 0_u16,
26143        chan7_raw: 0_u16,
26144        chan8_raw: 0_u16,
26145        chan9_raw: 0_u16,
26146        chan10_raw: 0_u16,
26147        chan11_raw: 0_u16,
26148        chan12_raw: 0_u16,
26149        chan13_raw: 0_u16,
26150        chan14_raw: 0_u16,
26151        chan15_raw: 0_u16,
26152        chan16_raw: 0_u16,
26153        chan17_raw: 0_u16,
26154        chan18_raw: 0_u16,
26155        chancount: 0_u8,
26156        rssi: 0_u8,
26157    };
26158    #[cfg(feature = "arbitrary")]
26159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26160        use arbitrary::{Arbitrary, Unstructured};
26161        let mut buf = [0u8; 1024];
26162        rng.fill_bytes(&mut buf);
26163        let mut unstructured = Unstructured::new(&buf);
26164        Self::arbitrary(&mut unstructured).unwrap_or_default()
26165    }
26166}
26167impl Default for RC_CHANNELS_DATA {
26168    fn default() -> Self {
26169        Self::DEFAULT.clone()
26170    }
26171}
26172impl MessageData for RC_CHANNELS_DATA {
26173    type Message = MavMessage;
26174    const ID: u32 = 65u32;
26175    const NAME: &'static str = "RC_CHANNELS";
26176    const EXTRA_CRC: u8 = 118u8;
26177    const ENCODED_LEN: usize = 42usize;
26178    fn deser(
26179        _version: MavlinkVersion,
26180        __input: &[u8],
26181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26182        let avail_len = __input.len();
26183        let mut payload_buf = [0; Self::ENCODED_LEN];
26184        let mut buf = if avail_len < Self::ENCODED_LEN {
26185            payload_buf[0..avail_len].copy_from_slice(__input);
26186            Bytes::new(&payload_buf)
26187        } else {
26188            Bytes::new(__input)
26189        };
26190        let mut __struct = Self::default();
26191        __struct.time_boot_ms = buf.get_u32_le();
26192        __struct.chan1_raw = buf.get_u16_le();
26193        __struct.chan2_raw = buf.get_u16_le();
26194        __struct.chan3_raw = buf.get_u16_le();
26195        __struct.chan4_raw = buf.get_u16_le();
26196        __struct.chan5_raw = buf.get_u16_le();
26197        __struct.chan6_raw = buf.get_u16_le();
26198        __struct.chan7_raw = buf.get_u16_le();
26199        __struct.chan8_raw = buf.get_u16_le();
26200        __struct.chan9_raw = buf.get_u16_le();
26201        __struct.chan10_raw = buf.get_u16_le();
26202        __struct.chan11_raw = buf.get_u16_le();
26203        __struct.chan12_raw = buf.get_u16_le();
26204        __struct.chan13_raw = buf.get_u16_le();
26205        __struct.chan14_raw = buf.get_u16_le();
26206        __struct.chan15_raw = buf.get_u16_le();
26207        __struct.chan16_raw = buf.get_u16_le();
26208        __struct.chan17_raw = buf.get_u16_le();
26209        __struct.chan18_raw = buf.get_u16_le();
26210        __struct.chancount = buf.get_u8();
26211        __struct.rssi = buf.get_u8();
26212        Ok(__struct)
26213    }
26214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26215        let mut __tmp = BytesMut::new(bytes);
26216        #[allow(clippy::absurd_extreme_comparisons)]
26217        #[allow(unused_comparisons)]
26218        if __tmp.remaining() < Self::ENCODED_LEN {
26219            panic!(
26220                "buffer is too small (need {} bytes, but got {})",
26221                Self::ENCODED_LEN,
26222                __tmp.remaining(),
26223            )
26224        }
26225        __tmp.put_u32_le(self.time_boot_ms);
26226        __tmp.put_u16_le(self.chan1_raw);
26227        __tmp.put_u16_le(self.chan2_raw);
26228        __tmp.put_u16_le(self.chan3_raw);
26229        __tmp.put_u16_le(self.chan4_raw);
26230        __tmp.put_u16_le(self.chan5_raw);
26231        __tmp.put_u16_le(self.chan6_raw);
26232        __tmp.put_u16_le(self.chan7_raw);
26233        __tmp.put_u16_le(self.chan8_raw);
26234        __tmp.put_u16_le(self.chan9_raw);
26235        __tmp.put_u16_le(self.chan10_raw);
26236        __tmp.put_u16_le(self.chan11_raw);
26237        __tmp.put_u16_le(self.chan12_raw);
26238        __tmp.put_u16_le(self.chan13_raw);
26239        __tmp.put_u16_le(self.chan14_raw);
26240        __tmp.put_u16_le(self.chan15_raw);
26241        __tmp.put_u16_le(self.chan16_raw);
26242        __tmp.put_u16_le(self.chan17_raw);
26243        __tmp.put_u16_le(self.chan18_raw);
26244        __tmp.put_u8(self.chancount);
26245        __tmp.put_u8(self.rssi);
26246        if matches!(version, MavlinkVersion::V2) {
26247            let len = __tmp.len();
26248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26249        } else {
26250            __tmp.len()
26251        }
26252    }
26253}
26254#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26255#[doc = ""]
26256#[doc = "ID: 70"]
26257#[derive(Debug, Clone, PartialEq)]
26258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26260#[cfg_attr(feature = "ts", derive(TS))]
26261#[cfg_attr(feature = "ts", ts(export))]
26262pub struct RC_CHANNELS_OVERRIDE_DATA {
26263    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26264    pub chan1_raw: u16,
26265    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26266    pub chan2_raw: u16,
26267    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26268    pub chan3_raw: u16,
26269    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26270    pub chan4_raw: u16,
26271    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26272    pub chan5_raw: u16,
26273    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26274    pub chan6_raw: u16,
26275    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26276    pub chan7_raw: u16,
26277    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26278    pub chan8_raw: u16,
26279    #[doc = "System ID"]
26280    pub target_system: u8,
26281    #[doc = "Component ID"]
26282    pub target_component: u8,
26283    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26284    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26285    pub chan9_raw: u16,
26286    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26287    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26288    pub chan10_raw: u16,
26289    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26290    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26291    pub chan11_raw: u16,
26292    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26293    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26294    pub chan12_raw: u16,
26295    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26296    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26297    pub chan13_raw: u16,
26298    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26299    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26300    pub chan14_raw: u16,
26301    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26303    pub chan15_raw: u16,
26304    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26305    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26306    pub chan16_raw: u16,
26307    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26308    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26309    pub chan17_raw: u16,
26310    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26311    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26312    pub chan18_raw: u16,
26313}
26314impl RC_CHANNELS_OVERRIDE_DATA {
26315    pub const ENCODED_LEN: usize = 38usize;
26316    pub const DEFAULT: Self = Self {
26317        chan1_raw: 0_u16,
26318        chan2_raw: 0_u16,
26319        chan3_raw: 0_u16,
26320        chan4_raw: 0_u16,
26321        chan5_raw: 0_u16,
26322        chan6_raw: 0_u16,
26323        chan7_raw: 0_u16,
26324        chan8_raw: 0_u16,
26325        target_system: 0_u8,
26326        target_component: 0_u8,
26327        chan9_raw: 0_u16,
26328        chan10_raw: 0_u16,
26329        chan11_raw: 0_u16,
26330        chan12_raw: 0_u16,
26331        chan13_raw: 0_u16,
26332        chan14_raw: 0_u16,
26333        chan15_raw: 0_u16,
26334        chan16_raw: 0_u16,
26335        chan17_raw: 0_u16,
26336        chan18_raw: 0_u16,
26337    };
26338    #[cfg(feature = "arbitrary")]
26339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26340        use arbitrary::{Arbitrary, Unstructured};
26341        let mut buf = [0u8; 1024];
26342        rng.fill_bytes(&mut buf);
26343        let mut unstructured = Unstructured::new(&buf);
26344        Self::arbitrary(&mut unstructured).unwrap_or_default()
26345    }
26346}
26347impl Default for RC_CHANNELS_OVERRIDE_DATA {
26348    fn default() -> Self {
26349        Self::DEFAULT.clone()
26350    }
26351}
26352impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26353    type Message = MavMessage;
26354    const ID: u32 = 70u32;
26355    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26356    const EXTRA_CRC: u8 = 124u8;
26357    const ENCODED_LEN: usize = 38usize;
26358    fn deser(
26359        _version: MavlinkVersion,
26360        __input: &[u8],
26361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26362        let avail_len = __input.len();
26363        let mut payload_buf = [0; Self::ENCODED_LEN];
26364        let mut buf = if avail_len < Self::ENCODED_LEN {
26365            payload_buf[0..avail_len].copy_from_slice(__input);
26366            Bytes::new(&payload_buf)
26367        } else {
26368            Bytes::new(__input)
26369        };
26370        let mut __struct = Self::default();
26371        __struct.chan1_raw = buf.get_u16_le();
26372        __struct.chan2_raw = buf.get_u16_le();
26373        __struct.chan3_raw = buf.get_u16_le();
26374        __struct.chan4_raw = buf.get_u16_le();
26375        __struct.chan5_raw = buf.get_u16_le();
26376        __struct.chan6_raw = buf.get_u16_le();
26377        __struct.chan7_raw = buf.get_u16_le();
26378        __struct.chan8_raw = buf.get_u16_le();
26379        __struct.target_system = buf.get_u8();
26380        __struct.target_component = buf.get_u8();
26381        __struct.chan9_raw = buf.get_u16_le();
26382        __struct.chan10_raw = buf.get_u16_le();
26383        __struct.chan11_raw = buf.get_u16_le();
26384        __struct.chan12_raw = buf.get_u16_le();
26385        __struct.chan13_raw = buf.get_u16_le();
26386        __struct.chan14_raw = buf.get_u16_le();
26387        __struct.chan15_raw = buf.get_u16_le();
26388        __struct.chan16_raw = buf.get_u16_le();
26389        __struct.chan17_raw = buf.get_u16_le();
26390        __struct.chan18_raw = buf.get_u16_le();
26391        Ok(__struct)
26392    }
26393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26394        let mut __tmp = BytesMut::new(bytes);
26395        #[allow(clippy::absurd_extreme_comparisons)]
26396        #[allow(unused_comparisons)]
26397        if __tmp.remaining() < Self::ENCODED_LEN {
26398            panic!(
26399                "buffer is too small (need {} bytes, but got {})",
26400                Self::ENCODED_LEN,
26401                __tmp.remaining(),
26402            )
26403        }
26404        __tmp.put_u16_le(self.chan1_raw);
26405        __tmp.put_u16_le(self.chan2_raw);
26406        __tmp.put_u16_le(self.chan3_raw);
26407        __tmp.put_u16_le(self.chan4_raw);
26408        __tmp.put_u16_le(self.chan5_raw);
26409        __tmp.put_u16_le(self.chan6_raw);
26410        __tmp.put_u16_le(self.chan7_raw);
26411        __tmp.put_u16_le(self.chan8_raw);
26412        __tmp.put_u8(self.target_system);
26413        __tmp.put_u8(self.target_component);
26414        if matches!(version, MavlinkVersion::V2) {
26415            __tmp.put_u16_le(self.chan9_raw);
26416            __tmp.put_u16_le(self.chan10_raw);
26417            __tmp.put_u16_le(self.chan11_raw);
26418            __tmp.put_u16_le(self.chan12_raw);
26419            __tmp.put_u16_le(self.chan13_raw);
26420            __tmp.put_u16_le(self.chan14_raw);
26421            __tmp.put_u16_le(self.chan15_raw);
26422            __tmp.put_u16_le(self.chan16_raw);
26423            __tmp.put_u16_le(self.chan17_raw);
26424            __tmp.put_u16_le(self.chan18_raw);
26425            let len = __tmp.len();
26426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26427        } else {
26428            __tmp.len()
26429        }
26430    }
26431}
26432#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26433#[doc = ""]
26434#[doc = "ID: 35"]
26435#[derive(Debug, Clone, PartialEq)]
26436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26438#[cfg_attr(feature = "ts", derive(TS))]
26439#[cfg_attr(feature = "ts", ts(export))]
26440pub struct RC_CHANNELS_RAW_DATA {
26441    #[doc = "Timestamp (time since system boot)."]
26442    pub time_boot_ms: u32,
26443    #[doc = "RC channel 1 value."]
26444    pub chan1_raw: u16,
26445    #[doc = "RC channel 2 value."]
26446    pub chan2_raw: u16,
26447    #[doc = "RC channel 3 value."]
26448    pub chan3_raw: u16,
26449    #[doc = "RC channel 4 value."]
26450    pub chan4_raw: u16,
26451    #[doc = "RC channel 5 value."]
26452    pub chan5_raw: u16,
26453    #[doc = "RC channel 6 value."]
26454    pub chan6_raw: u16,
26455    #[doc = "RC channel 7 value."]
26456    pub chan7_raw: u16,
26457    #[doc = "RC channel 8 value."]
26458    pub chan8_raw: u16,
26459    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26460    pub port: u8,
26461    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26462    pub rssi: u8,
26463}
26464impl RC_CHANNELS_RAW_DATA {
26465    pub const ENCODED_LEN: usize = 22usize;
26466    pub const DEFAULT: Self = Self {
26467        time_boot_ms: 0_u32,
26468        chan1_raw: 0_u16,
26469        chan2_raw: 0_u16,
26470        chan3_raw: 0_u16,
26471        chan4_raw: 0_u16,
26472        chan5_raw: 0_u16,
26473        chan6_raw: 0_u16,
26474        chan7_raw: 0_u16,
26475        chan8_raw: 0_u16,
26476        port: 0_u8,
26477        rssi: 0_u8,
26478    };
26479    #[cfg(feature = "arbitrary")]
26480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26481        use arbitrary::{Arbitrary, Unstructured};
26482        let mut buf = [0u8; 1024];
26483        rng.fill_bytes(&mut buf);
26484        let mut unstructured = Unstructured::new(&buf);
26485        Self::arbitrary(&mut unstructured).unwrap_or_default()
26486    }
26487}
26488impl Default for RC_CHANNELS_RAW_DATA {
26489    fn default() -> Self {
26490        Self::DEFAULT.clone()
26491    }
26492}
26493impl MessageData for RC_CHANNELS_RAW_DATA {
26494    type Message = MavMessage;
26495    const ID: u32 = 35u32;
26496    const NAME: &'static str = "RC_CHANNELS_RAW";
26497    const EXTRA_CRC: u8 = 244u8;
26498    const ENCODED_LEN: usize = 22usize;
26499    fn deser(
26500        _version: MavlinkVersion,
26501        __input: &[u8],
26502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26503        let avail_len = __input.len();
26504        let mut payload_buf = [0; Self::ENCODED_LEN];
26505        let mut buf = if avail_len < Self::ENCODED_LEN {
26506            payload_buf[0..avail_len].copy_from_slice(__input);
26507            Bytes::new(&payload_buf)
26508        } else {
26509            Bytes::new(__input)
26510        };
26511        let mut __struct = Self::default();
26512        __struct.time_boot_ms = buf.get_u32_le();
26513        __struct.chan1_raw = buf.get_u16_le();
26514        __struct.chan2_raw = buf.get_u16_le();
26515        __struct.chan3_raw = buf.get_u16_le();
26516        __struct.chan4_raw = buf.get_u16_le();
26517        __struct.chan5_raw = buf.get_u16_le();
26518        __struct.chan6_raw = buf.get_u16_le();
26519        __struct.chan7_raw = buf.get_u16_le();
26520        __struct.chan8_raw = buf.get_u16_le();
26521        __struct.port = buf.get_u8();
26522        __struct.rssi = buf.get_u8();
26523        Ok(__struct)
26524    }
26525    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26526        let mut __tmp = BytesMut::new(bytes);
26527        #[allow(clippy::absurd_extreme_comparisons)]
26528        #[allow(unused_comparisons)]
26529        if __tmp.remaining() < Self::ENCODED_LEN {
26530            panic!(
26531                "buffer is too small (need {} bytes, but got {})",
26532                Self::ENCODED_LEN,
26533                __tmp.remaining(),
26534            )
26535        }
26536        __tmp.put_u32_le(self.time_boot_ms);
26537        __tmp.put_u16_le(self.chan1_raw);
26538        __tmp.put_u16_le(self.chan2_raw);
26539        __tmp.put_u16_le(self.chan3_raw);
26540        __tmp.put_u16_le(self.chan4_raw);
26541        __tmp.put_u16_le(self.chan5_raw);
26542        __tmp.put_u16_le(self.chan6_raw);
26543        __tmp.put_u16_le(self.chan7_raw);
26544        __tmp.put_u16_le(self.chan8_raw);
26545        __tmp.put_u8(self.port);
26546        __tmp.put_u8(self.rssi);
26547        if matches!(version, MavlinkVersion::V2) {
26548            let len = __tmp.len();
26549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26550        } else {
26551            __tmp.len()
26552        }
26553    }
26554}
26555#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26556#[doc = ""]
26557#[doc = "ID: 34"]
26558#[derive(Debug, Clone, PartialEq)]
26559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26561#[cfg_attr(feature = "ts", derive(TS))]
26562#[cfg_attr(feature = "ts", ts(export))]
26563pub struct RC_CHANNELS_SCALED_DATA {
26564    #[doc = "Timestamp (time since system boot)."]
26565    pub time_boot_ms: u32,
26566    #[doc = "RC channel 1 value scaled."]
26567    pub chan1_scaled: i16,
26568    #[doc = "RC channel 2 value scaled."]
26569    pub chan2_scaled: i16,
26570    #[doc = "RC channel 3 value scaled."]
26571    pub chan3_scaled: i16,
26572    #[doc = "RC channel 4 value scaled."]
26573    pub chan4_scaled: i16,
26574    #[doc = "RC channel 5 value scaled."]
26575    pub chan5_scaled: i16,
26576    #[doc = "RC channel 6 value scaled."]
26577    pub chan6_scaled: i16,
26578    #[doc = "RC channel 7 value scaled."]
26579    pub chan7_scaled: i16,
26580    #[doc = "RC channel 8 value scaled."]
26581    pub chan8_scaled: i16,
26582    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26583    pub port: u8,
26584    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26585    pub rssi: u8,
26586}
26587impl RC_CHANNELS_SCALED_DATA {
26588    pub const ENCODED_LEN: usize = 22usize;
26589    pub const DEFAULT: Self = Self {
26590        time_boot_ms: 0_u32,
26591        chan1_scaled: 0_i16,
26592        chan2_scaled: 0_i16,
26593        chan3_scaled: 0_i16,
26594        chan4_scaled: 0_i16,
26595        chan5_scaled: 0_i16,
26596        chan6_scaled: 0_i16,
26597        chan7_scaled: 0_i16,
26598        chan8_scaled: 0_i16,
26599        port: 0_u8,
26600        rssi: 0_u8,
26601    };
26602    #[cfg(feature = "arbitrary")]
26603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26604        use arbitrary::{Arbitrary, Unstructured};
26605        let mut buf = [0u8; 1024];
26606        rng.fill_bytes(&mut buf);
26607        let mut unstructured = Unstructured::new(&buf);
26608        Self::arbitrary(&mut unstructured).unwrap_or_default()
26609    }
26610}
26611impl Default for RC_CHANNELS_SCALED_DATA {
26612    fn default() -> Self {
26613        Self::DEFAULT.clone()
26614    }
26615}
26616impl MessageData for RC_CHANNELS_SCALED_DATA {
26617    type Message = MavMessage;
26618    const ID: u32 = 34u32;
26619    const NAME: &'static str = "RC_CHANNELS_SCALED";
26620    const EXTRA_CRC: u8 = 237u8;
26621    const ENCODED_LEN: usize = 22usize;
26622    fn deser(
26623        _version: MavlinkVersion,
26624        __input: &[u8],
26625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26626        let avail_len = __input.len();
26627        let mut payload_buf = [0; Self::ENCODED_LEN];
26628        let mut buf = if avail_len < Self::ENCODED_LEN {
26629            payload_buf[0..avail_len].copy_from_slice(__input);
26630            Bytes::new(&payload_buf)
26631        } else {
26632            Bytes::new(__input)
26633        };
26634        let mut __struct = Self::default();
26635        __struct.time_boot_ms = buf.get_u32_le();
26636        __struct.chan1_scaled = buf.get_i16_le();
26637        __struct.chan2_scaled = buf.get_i16_le();
26638        __struct.chan3_scaled = buf.get_i16_le();
26639        __struct.chan4_scaled = buf.get_i16_le();
26640        __struct.chan5_scaled = buf.get_i16_le();
26641        __struct.chan6_scaled = buf.get_i16_le();
26642        __struct.chan7_scaled = buf.get_i16_le();
26643        __struct.chan8_scaled = buf.get_i16_le();
26644        __struct.port = buf.get_u8();
26645        __struct.rssi = buf.get_u8();
26646        Ok(__struct)
26647    }
26648    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26649        let mut __tmp = BytesMut::new(bytes);
26650        #[allow(clippy::absurd_extreme_comparisons)]
26651        #[allow(unused_comparisons)]
26652        if __tmp.remaining() < Self::ENCODED_LEN {
26653            panic!(
26654                "buffer is too small (need {} bytes, but got {})",
26655                Self::ENCODED_LEN,
26656                __tmp.remaining(),
26657            )
26658        }
26659        __tmp.put_u32_le(self.time_boot_ms);
26660        __tmp.put_i16_le(self.chan1_scaled);
26661        __tmp.put_i16_le(self.chan2_scaled);
26662        __tmp.put_i16_le(self.chan3_scaled);
26663        __tmp.put_i16_le(self.chan4_scaled);
26664        __tmp.put_i16_le(self.chan5_scaled);
26665        __tmp.put_i16_le(self.chan6_scaled);
26666        __tmp.put_i16_le(self.chan7_scaled);
26667        __tmp.put_i16_le(self.chan8_scaled);
26668        __tmp.put_u8(self.port);
26669        __tmp.put_u8(self.rssi);
26670        if matches!(version, MavlinkVersion::V2) {
26671            let len = __tmp.len();
26672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26673        } else {
26674            __tmp.len()
26675        }
26676    }
26677}
26678#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26679#[doc = "Request a data stream."]
26680#[doc = ""]
26681#[doc = "ID: 66"]
26682#[derive(Debug, Clone, PartialEq)]
26683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26685#[cfg_attr(feature = "ts", derive(TS))]
26686#[cfg_attr(feature = "ts", ts(export))]
26687pub struct REQUEST_DATA_STREAM_DATA {
26688    #[doc = "The requested message rate"]
26689    pub req_message_rate: u16,
26690    #[doc = "The target requested to send the message stream."]
26691    pub target_system: u8,
26692    #[doc = "The target requested to send the message stream."]
26693    pub target_component: u8,
26694    #[doc = "The ID of the requested data stream"]
26695    pub req_stream_id: u8,
26696    #[doc = "1 to start sending, 0 to stop sending."]
26697    pub start_stop: u8,
26698}
26699impl REQUEST_DATA_STREAM_DATA {
26700    pub const ENCODED_LEN: usize = 6usize;
26701    pub const DEFAULT: Self = Self {
26702        req_message_rate: 0_u16,
26703        target_system: 0_u8,
26704        target_component: 0_u8,
26705        req_stream_id: 0_u8,
26706        start_stop: 0_u8,
26707    };
26708    #[cfg(feature = "arbitrary")]
26709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26710        use arbitrary::{Arbitrary, Unstructured};
26711        let mut buf = [0u8; 1024];
26712        rng.fill_bytes(&mut buf);
26713        let mut unstructured = Unstructured::new(&buf);
26714        Self::arbitrary(&mut unstructured).unwrap_or_default()
26715    }
26716}
26717impl Default for REQUEST_DATA_STREAM_DATA {
26718    fn default() -> Self {
26719        Self::DEFAULT.clone()
26720    }
26721}
26722impl MessageData for REQUEST_DATA_STREAM_DATA {
26723    type Message = MavMessage;
26724    const ID: u32 = 66u32;
26725    const NAME: &'static str = "REQUEST_DATA_STREAM";
26726    const EXTRA_CRC: u8 = 148u8;
26727    const ENCODED_LEN: usize = 6usize;
26728    fn deser(
26729        _version: MavlinkVersion,
26730        __input: &[u8],
26731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26732        let avail_len = __input.len();
26733        let mut payload_buf = [0; Self::ENCODED_LEN];
26734        let mut buf = if avail_len < Self::ENCODED_LEN {
26735            payload_buf[0..avail_len].copy_from_slice(__input);
26736            Bytes::new(&payload_buf)
26737        } else {
26738            Bytes::new(__input)
26739        };
26740        let mut __struct = Self::default();
26741        __struct.req_message_rate = buf.get_u16_le();
26742        __struct.target_system = buf.get_u8();
26743        __struct.target_component = buf.get_u8();
26744        __struct.req_stream_id = buf.get_u8();
26745        __struct.start_stop = buf.get_u8();
26746        Ok(__struct)
26747    }
26748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26749        let mut __tmp = BytesMut::new(bytes);
26750        #[allow(clippy::absurd_extreme_comparisons)]
26751        #[allow(unused_comparisons)]
26752        if __tmp.remaining() < Self::ENCODED_LEN {
26753            panic!(
26754                "buffer is too small (need {} bytes, but got {})",
26755                Self::ENCODED_LEN,
26756                __tmp.remaining(),
26757            )
26758        }
26759        __tmp.put_u16_le(self.req_message_rate);
26760        __tmp.put_u8(self.target_system);
26761        __tmp.put_u8(self.target_component);
26762        __tmp.put_u8(self.req_stream_id);
26763        __tmp.put_u8(self.start_stop);
26764        if matches!(version, MavlinkVersion::V2) {
26765            let len = __tmp.len();
26766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26767        } else {
26768            __tmp.len()
26769        }
26770    }
26771}
26772#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26773#[doc = ""]
26774#[doc = "ID: 412"]
26775#[derive(Debug, Clone, PartialEq)]
26776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26777#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26778#[cfg_attr(feature = "ts", derive(TS))]
26779#[cfg_attr(feature = "ts", ts(export))]
26780pub struct REQUEST_EVENT_DATA {
26781    #[doc = "First sequence number of the requested event."]
26782    pub first_sequence: u16,
26783    #[doc = "Last sequence number of the requested event."]
26784    pub last_sequence: u16,
26785    #[doc = "System ID"]
26786    pub target_system: u8,
26787    #[doc = "Component ID"]
26788    pub target_component: u8,
26789}
26790impl REQUEST_EVENT_DATA {
26791    pub const ENCODED_LEN: usize = 6usize;
26792    pub const DEFAULT: Self = Self {
26793        first_sequence: 0_u16,
26794        last_sequence: 0_u16,
26795        target_system: 0_u8,
26796        target_component: 0_u8,
26797    };
26798    #[cfg(feature = "arbitrary")]
26799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26800        use arbitrary::{Arbitrary, Unstructured};
26801        let mut buf = [0u8; 1024];
26802        rng.fill_bytes(&mut buf);
26803        let mut unstructured = Unstructured::new(&buf);
26804        Self::arbitrary(&mut unstructured).unwrap_or_default()
26805    }
26806}
26807impl Default for REQUEST_EVENT_DATA {
26808    fn default() -> Self {
26809        Self::DEFAULT.clone()
26810    }
26811}
26812impl MessageData for REQUEST_EVENT_DATA {
26813    type Message = MavMessage;
26814    const ID: u32 = 412u32;
26815    const NAME: &'static str = "REQUEST_EVENT";
26816    const EXTRA_CRC: u8 = 33u8;
26817    const ENCODED_LEN: usize = 6usize;
26818    fn deser(
26819        _version: MavlinkVersion,
26820        __input: &[u8],
26821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26822        let avail_len = __input.len();
26823        let mut payload_buf = [0; Self::ENCODED_LEN];
26824        let mut buf = if avail_len < Self::ENCODED_LEN {
26825            payload_buf[0..avail_len].copy_from_slice(__input);
26826            Bytes::new(&payload_buf)
26827        } else {
26828            Bytes::new(__input)
26829        };
26830        let mut __struct = Self::default();
26831        __struct.first_sequence = buf.get_u16_le();
26832        __struct.last_sequence = buf.get_u16_le();
26833        __struct.target_system = buf.get_u8();
26834        __struct.target_component = buf.get_u8();
26835        Ok(__struct)
26836    }
26837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26838        let mut __tmp = BytesMut::new(bytes);
26839        #[allow(clippy::absurd_extreme_comparisons)]
26840        #[allow(unused_comparisons)]
26841        if __tmp.remaining() < Self::ENCODED_LEN {
26842            panic!(
26843                "buffer is too small (need {} bytes, but got {})",
26844                Self::ENCODED_LEN,
26845                __tmp.remaining(),
26846            )
26847        }
26848        __tmp.put_u16_le(self.first_sequence);
26849        __tmp.put_u16_le(self.last_sequence);
26850        __tmp.put_u8(self.target_system);
26851        __tmp.put_u8(self.target_component);
26852        if matches!(version, MavlinkVersion::V2) {
26853            let len = __tmp.len();
26854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26855        } else {
26856            __tmp.len()
26857        }
26858    }
26859}
26860#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26861#[doc = ""]
26862#[doc = "ID: 142"]
26863#[derive(Debug, Clone, PartialEq)]
26864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26866#[cfg_attr(feature = "ts", derive(TS))]
26867#[cfg_attr(feature = "ts", ts(export))]
26868pub struct RESOURCE_REQUEST_DATA {
26869    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26870    pub request_id: u8,
26871    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26872    pub uri_type: u8,
26873    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26875    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26876    pub uri: [u8; 120],
26877    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26878    pub transfer_type: u8,
26879    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26881    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26882    pub storage: [u8; 120],
26883}
26884impl RESOURCE_REQUEST_DATA {
26885    pub const ENCODED_LEN: usize = 243usize;
26886    pub const DEFAULT: Self = Self {
26887        request_id: 0_u8,
26888        uri_type: 0_u8,
26889        uri: [0_u8; 120usize],
26890        transfer_type: 0_u8,
26891        storage: [0_u8; 120usize],
26892    };
26893    #[cfg(feature = "arbitrary")]
26894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26895        use arbitrary::{Arbitrary, Unstructured};
26896        let mut buf = [0u8; 1024];
26897        rng.fill_bytes(&mut buf);
26898        let mut unstructured = Unstructured::new(&buf);
26899        Self::arbitrary(&mut unstructured).unwrap_or_default()
26900    }
26901}
26902impl Default for RESOURCE_REQUEST_DATA {
26903    fn default() -> Self {
26904        Self::DEFAULT.clone()
26905    }
26906}
26907impl MessageData for RESOURCE_REQUEST_DATA {
26908    type Message = MavMessage;
26909    const ID: u32 = 142u32;
26910    const NAME: &'static str = "RESOURCE_REQUEST";
26911    const EXTRA_CRC: u8 = 72u8;
26912    const ENCODED_LEN: usize = 243usize;
26913    fn deser(
26914        _version: MavlinkVersion,
26915        __input: &[u8],
26916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26917        let avail_len = __input.len();
26918        let mut payload_buf = [0; Self::ENCODED_LEN];
26919        let mut buf = if avail_len < Self::ENCODED_LEN {
26920            payload_buf[0..avail_len].copy_from_slice(__input);
26921            Bytes::new(&payload_buf)
26922        } else {
26923            Bytes::new(__input)
26924        };
26925        let mut __struct = Self::default();
26926        __struct.request_id = buf.get_u8();
26927        __struct.uri_type = buf.get_u8();
26928        for v in &mut __struct.uri {
26929            let val = buf.get_u8();
26930            *v = val;
26931        }
26932        __struct.transfer_type = buf.get_u8();
26933        for v in &mut __struct.storage {
26934            let val = buf.get_u8();
26935            *v = val;
26936        }
26937        Ok(__struct)
26938    }
26939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26940        let mut __tmp = BytesMut::new(bytes);
26941        #[allow(clippy::absurd_extreme_comparisons)]
26942        #[allow(unused_comparisons)]
26943        if __tmp.remaining() < Self::ENCODED_LEN {
26944            panic!(
26945                "buffer is too small (need {} bytes, but got {})",
26946                Self::ENCODED_LEN,
26947                __tmp.remaining(),
26948            )
26949        }
26950        __tmp.put_u8(self.request_id);
26951        __tmp.put_u8(self.uri_type);
26952        for val in &self.uri {
26953            __tmp.put_u8(*val);
26954        }
26955        __tmp.put_u8(self.transfer_type);
26956        for val in &self.storage {
26957            __tmp.put_u8(*val);
26958        }
26959        if matches!(version, MavlinkVersion::V2) {
26960            let len = __tmp.len();
26961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26962        } else {
26963            __tmp.len()
26964        }
26965    }
26966}
26967#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26968#[doc = ""]
26969#[doc = "ID: 413"]
26970#[derive(Debug, Clone, PartialEq)]
26971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26973#[cfg_attr(feature = "ts", derive(TS))]
26974#[cfg_attr(feature = "ts", ts(export))]
26975pub struct RESPONSE_EVENT_ERROR_DATA {
26976    #[doc = "Sequence number."]
26977    pub sequence: u16,
26978    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26979    pub sequence_oldest_available: u16,
26980    #[doc = "System ID"]
26981    pub target_system: u8,
26982    #[doc = "Component ID"]
26983    pub target_component: u8,
26984    #[doc = "Error reason."]
26985    pub reason: MavEventErrorReason,
26986}
26987impl RESPONSE_EVENT_ERROR_DATA {
26988    pub const ENCODED_LEN: usize = 7usize;
26989    pub const DEFAULT: Self = Self {
26990        sequence: 0_u16,
26991        sequence_oldest_available: 0_u16,
26992        target_system: 0_u8,
26993        target_component: 0_u8,
26994        reason: MavEventErrorReason::DEFAULT,
26995    };
26996    #[cfg(feature = "arbitrary")]
26997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26998        use arbitrary::{Arbitrary, Unstructured};
26999        let mut buf = [0u8; 1024];
27000        rng.fill_bytes(&mut buf);
27001        let mut unstructured = Unstructured::new(&buf);
27002        Self::arbitrary(&mut unstructured).unwrap_or_default()
27003    }
27004}
27005impl Default for RESPONSE_EVENT_ERROR_DATA {
27006    fn default() -> Self {
27007        Self::DEFAULT.clone()
27008    }
27009}
27010impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27011    type Message = MavMessage;
27012    const ID: u32 = 413u32;
27013    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27014    const EXTRA_CRC: u8 = 77u8;
27015    const ENCODED_LEN: usize = 7usize;
27016    fn deser(
27017        _version: MavlinkVersion,
27018        __input: &[u8],
27019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27020        let avail_len = __input.len();
27021        let mut payload_buf = [0; Self::ENCODED_LEN];
27022        let mut buf = if avail_len < Self::ENCODED_LEN {
27023            payload_buf[0..avail_len].copy_from_slice(__input);
27024            Bytes::new(&payload_buf)
27025        } else {
27026            Bytes::new(__input)
27027        };
27028        let mut __struct = Self::default();
27029        __struct.sequence = buf.get_u16_le();
27030        __struct.sequence_oldest_available = buf.get_u16_le();
27031        __struct.target_system = buf.get_u8();
27032        __struct.target_component = buf.get_u8();
27033        let tmp = buf.get_u8();
27034        __struct.reason =
27035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27036                enum_type: "MavEventErrorReason",
27037                value: tmp as u64,
27038            })?;
27039        Ok(__struct)
27040    }
27041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27042        let mut __tmp = BytesMut::new(bytes);
27043        #[allow(clippy::absurd_extreme_comparisons)]
27044        #[allow(unused_comparisons)]
27045        if __tmp.remaining() < Self::ENCODED_LEN {
27046            panic!(
27047                "buffer is too small (need {} bytes, but got {})",
27048                Self::ENCODED_LEN,
27049                __tmp.remaining(),
27050            )
27051        }
27052        __tmp.put_u16_le(self.sequence);
27053        __tmp.put_u16_le(self.sequence_oldest_available);
27054        __tmp.put_u8(self.target_system);
27055        __tmp.put_u8(self.target_component);
27056        __tmp.put_u8(self.reason as u8);
27057        if matches!(version, MavlinkVersion::V2) {
27058            let len = __tmp.len();
27059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27060        } else {
27061            __tmp.len()
27062        }
27063    }
27064}
27065#[doc = "Read out the safety zone the MAV currently assumes."]
27066#[doc = ""]
27067#[doc = "ID: 55"]
27068#[derive(Debug, Clone, PartialEq)]
27069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27071#[cfg_attr(feature = "ts", derive(TS))]
27072#[cfg_attr(feature = "ts", ts(export))]
27073pub struct SAFETY_ALLOWED_AREA_DATA {
27074    #[doc = "x position 1 / Latitude 1"]
27075    pub p1x: f32,
27076    #[doc = "y position 1 / Longitude 1"]
27077    pub p1y: f32,
27078    #[doc = "z position 1 / Altitude 1"]
27079    pub p1z: f32,
27080    #[doc = "x position 2 / Latitude 2"]
27081    pub p2x: f32,
27082    #[doc = "y position 2 / Longitude 2"]
27083    pub p2y: f32,
27084    #[doc = "z position 2 / Altitude 2"]
27085    pub p2z: f32,
27086    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27087    pub frame: MavFrame,
27088}
27089impl SAFETY_ALLOWED_AREA_DATA {
27090    pub const ENCODED_LEN: usize = 25usize;
27091    pub const DEFAULT: Self = Self {
27092        p1x: 0.0_f32,
27093        p1y: 0.0_f32,
27094        p1z: 0.0_f32,
27095        p2x: 0.0_f32,
27096        p2y: 0.0_f32,
27097        p2z: 0.0_f32,
27098        frame: MavFrame::DEFAULT,
27099    };
27100    #[cfg(feature = "arbitrary")]
27101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27102        use arbitrary::{Arbitrary, Unstructured};
27103        let mut buf = [0u8; 1024];
27104        rng.fill_bytes(&mut buf);
27105        let mut unstructured = Unstructured::new(&buf);
27106        Self::arbitrary(&mut unstructured).unwrap_or_default()
27107    }
27108}
27109impl Default for SAFETY_ALLOWED_AREA_DATA {
27110    fn default() -> Self {
27111        Self::DEFAULT.clone()
27112    }
27113}
27114impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27115    type Message = MavMessage;
27116    const ID: u32 = 55u32;
27117    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27118    const EXTRA_CRC: u8 = 3u8;
27119    const ENCODED_LEN: usize = 25usize;
27120    fn deser(
27121        _version: MavlinkVersion,
27122        __input: &[u8],
27123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27124        let avail_len = __input.len();
27125        let mut payload_buf = [0; Self::ENCODED_LEN];
27126        let mut buf = if avail_len < Self::ENCODED_LEN {
27127            payload_buf[0..avail_len].copy_from_slice(__input);
27128            Bytes::new(&payload_buf)
27129        } else {
27130            Bytes::new(__input)
27131        };
27132        let mut __struct = Self::default();
27133        __struct.p1x = buf.get_f32_le();
27134        __struct.p1y = buf.get_f32_le();
27135        __struct.p1z = buf.get_f32_le();
27136        __struct.p2x = buf.get_f32_le();
27137        __struct.p2y = buf.get_f32_le();
27138        __struct.p2z = buf.get_f32_le();
27139        let tmp = buf.get_u8();
27140        __struct.frame =
27141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27142                enum_type: "MavFrame",
27143                value: tmp as u64,
27144            })?;
27145        Ok(__struct)
27146    }
27147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27148        let mut __tmp = BytesMut::new(bytes);
27149        #[allow(clippy::absurd_extreme_comparisons)]
27150        #[allow(unused_comparisons)]
27151        if __tmp.remaining() < Self::ENCODED_LEN {
27152            panic!(
27153                "buffer is too small (need {} bytes, but got {})",
27154                Self::ENCODED_LEN,
27155                __tmp.remaining(),
27156            )
27157        }
27158        __tmp.put_f32_le(self.p1x);
27159        __tmp.put_f32_le(self.p1y);
27160        __tmp.put_f32_le(self.p1z);
27161        __tmp.put_f32_le(self.p2x);
27162        __tmp.put_f32_le(self.p2y);
27163        __tmp.put_f32_le(self.p2z);
27164        __tmp.put_u8(self.frame as u8);
27165        if matches!(version, MavlinkVersion::V2) {
27166            let len = __tmp.len();
27167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27168        } else {
27169            __tmp.len()
27170        }
27171    }
27172}
27173#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27174#[doc = ""]
27175#[doc = "ID: 54"]
27176#[derive(Debug, Clone, PartialEq)]
27177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27179#[cfg_attr(feature = "ts", derive(TS))]
27180#[cfg_attr(feature = "ts", ts(export))]
27181pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27182    #[doc = "x position 1 / Latitude 1"]
27183    pub p1x: f32,
27184    #[doc = "y position 1 / Longitude 1"]
27185    pub p1y: f32,
27186    #[doc = "z position 1 / Altitude 1"]
27187    pub p1z: f32,
27188    #[doc = "x position 2 / Latitude 2"]
27189    pub p2x: f32,
27190    #[doc = "y position 2 / Longitude 2"]
27191    pub p2y: f32,
27192    #[doc = "z position 2 / Altitude 2"]
27193    pub p2z: f32,
27194    #[doc = "System ID"]
27195    pub target_system: u8,
27196    #[doc = "Component ID"]
27197    pub target_component: u8,
27198    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27199    pub frame: MavFrame,
27200}
27201impl SAFETY_SET_ALLOWED_AREA_DATA {
27202    pub const ENCODED_LEN: usize = 27usize;
27203    pub const DEFAULT: Self = Self {
27204        p1x: 0.0_f32,
27205        p1y: 0.0_f32,
27206        p1z: 0.0_f32,
27207        p2x: 0.0_f32,
27208        p2y: 0.0_f32,
27209        p2z: 0.0_f32,
27210        target_system: 0_u8,
27211        target_component: 0_u8,
27212        frame: MavFrame::DEFAULT,
27213    };
27214    #[cfg(feature = "arbitrary")]
27215    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27216        use arbitrary::{Arbitrary, Unstructured};
27217        let mut buf = [0u8; 1024];
27218        rng.fill_bytes(&mut buf);
27219        let mut unstructured = Unstructured::new(&buf);
27220        Self::arbitrary(&mut unstructured).unwrap_or_default()
27221    }
27222}
27223impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27224    fn default() -> Self {
27225        Self::DEFAULT.clone()
27226    }
27227}
27228impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27229    type Message = MavMessage;
27230    const ID: u32 = 54u32;
27231    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27232    const EXTRA_CRC: u8 = 15u8;
27233    const ENCODED_LEN: usize = 27usize;
27234    fn deser(
27235        _version: MavlinkVersion,
27236        __input: &[u8],
27237    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27238        let avail_len = __input.len();
27239        let mut payload_buf = [0; Self::ENCODED_LEN];
27240        let mut buf = if avail_len < Self::ENCODED_LEN {
27241            payload_buf[0..avail_len].copy_from_slice(__input);
27242            Bytes::new(&payload_buf)
27243        } else {
27244            Bytes::new(__input)
27245        };
27246        let mut __struct = Self::default();
27247        __struct.p1x = buf.get_f32_le();
27248        __struct.p1y = buf.get_f32_le();
27249        __struct.p1z = buf.get_f32_le();
27250        __struct.p2x = buf.get_f32_le();
27251        __struct.p2y = buf.get_f32_le();
27252        __struct.p2z = buf.get_f32_le();
27253        __struct.target_system = buf.get_u8();
27254        __struct.target_component = buf.get_u8();
27255        let tmp = buf.get_u8();
27256        __struct.frame =
27257            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27258                enum_type: "MavFrame",
27259                value: tmp as u64,
27260            })?;
27261        Ok(__struct)
27262    }
27263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27264        let mut __tmp = BytesMut::new(bytes);
27265        #[allow(clippy::absurd_extreme_comparisons)]
27266        #[allow(unused_comparisons)]
27267        if __tmp.remaining() < Self::ENCODED_LEN {
27268            panic!(
27269                "buffer is too small (need {} bytes, but got {})",
27270                Self::ENCODED_LEN,
27271                __tmp.remaining(),
27272            )
27273        }
27274        __tmp.put_f32_le(self.p1x);
27275        __tmp.put_f32_le(self.p1y);
27276        __tmp.put_f32_le(self.p1z);
27277        __tmp.put_f32_le(self.p2x);
27278        __tmp.put_f32_le(self.p2y);
27279        __tmp.put_f32_le(self.p2z);
27280        __tmp.put_u8(self.target_system);
27281        __tmp.put_u8(self.target_component);
27282        __tmp.put_u8(self.frame as u8);
27283        if matches!(version, MavlinkVersion::V2) {
27284            let len = __tmp.len();
27285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27286        } else {
27287            __tmp.len()
27288        }
27289    }
27290}
27291#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27292#[doc = ""]
27293#[doc = "ID: 26"]
27294#[derive(Debug, Clone, PartialEq)]
27295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27297#[cfg_attr(feature = "ts", derive(TS))]
27298#[cfg_attr(feature = "ts", ts(export))]
27299pub struct SCALED_IMU_DATA {
27300    #[doc = "Timestamp (time since system boot)."]
27301    pub time_boot_ms: u32,
27302    #[doc = "X acceleration"]
27303    pub xacc: i16,
27304    #[doc = "Y acceleration"]
27305    pub yacc: i16,
27306    #[doc = "Z acceleration"]
27307    pub zacc: i16,
27308    #[doc = "Angular speed around X axis"]
27309    pub xgyro: i16,
27310    #[doc = "Angular speed around Y axis"]
27311    pub ygyro: i16,
27312    #[doc = "Angular speed around Z axis"]
27313    pub zgyro: i16,
27314    #[doc = "X Magnetic field"]
27315    pub xmag: i16,
27316    #[doc = "Y Magnetic field"]
27317    pub ymag: i16,
27318    #[doc = "Z Magnetic field"]
27319    pub zmag: i16,
27320    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27321    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27322    pub temperature: i16,
27323}
27324impl SCALED_IMU_DATA {
27325    pub const ENCODED_LEN: usize = 24usize;
27326    pub const DEFAULT: Self = Self {
27327        time_boot_ms: 0_u32,
27328        xacc: 0_i16,
27329        yacc: 0_i16,
27330        zacc: 0_i16,
27331        xgyro: 0_i16,
27332        ygyro: 0_i16,
27333        zgyro: 0_i16,
27334        xmag: 0_i16,
27335        ymag: 0_i16,
27336        zmag: 0_i16,
27337        temperature: 0_i16,
27338    };
27339    #[cfg(feature = "arbitrary")]
27340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27341        use arbitrary::{Arbitrary, Unstructured};
27342        let mut buf = [0u8; 1024];
27343        rng.fill_bytes(&mut buf);
27344        let mut unstructured = Unstructured::new(&buf);
27345        Self::arbitrary(&mut unstructured).unwrap_or_default()
27346    }
27347}
27348impl Default for SCALED_IMU_DATA {
27349    fn default() -> Self {
27350        Self::DEFAULT.clone()
27351    }
27352}
27353impl MessageData for SCALED_IMU_DATA {
27354    type Message = MavMessage;
27355    const ID: u32 = 26u32;
27356    const NAME: &'static str = "SCALED_IMU";
27357    const EXTRA_CRC: u8 = 170u8;
27358    const ENCODED_LEN: usize = 24usize;
27359    fn deser(
27360        _version: MavlinkVersion,
27361        __input: &[u8],
27362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27363        let avail_len = __input.len();
27364        let mut payload_buf = [0; Self::ENCODED_LEN];
27365        let mut buf = if avail_len < Self::ENCODED_LEN {
27366            payload_buf[0..avail_len].copy_from_slice(__input);
27367            Bytes::new(&payload_buf)
27368        } else {
27369            Bytes::new(__input)
27370        };
27371        let mut __struct = Self::default();
27372        __struct.time_boot_ms = buf.get_u32_le();
27373        __struct.xacc = buf.get_i16_le();
27374        __struct.yacc = buf.get_i16_le();
27375        __struct.zacc = buf.get_i16_le();
27376        __struct.xgyro = buf.get_i16_le();
27377        __struct.ygyro = buf.get_i16_le();
27378        __struct.zgyro = buf.get_i16_le();
27379        __struct.xmag = buf.get_i16_le();
27380        __struct.ymag = buf.get_i16_le();
27381        __struct.zmag = buf.get_i16_le();
27382        __struct.temperature = buf.get_i16_le();
27383        Ok(__struct)
27384    }
27385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27386        let mut __tmp = BytesMut::new(bytes);
27387        #[allow(clippy::absurd_extreme_comparisons)]
27388        #[allow(unused_comparisons)]
27389        if __tmp.remaining() < Self::ENCODED_LEN {
27390            panic!(
27391                "buffer is too small (need {} bytes, but got {})",
27392                Self::ENCODED_LEN,
27393                __tmp.remaining(),
27394            )
27395        }
27396        __tmp.put_u32_le(self.time_boot_ms);
27397        __tmp.put_i16_le(self.xacc);
27398        __tmp.put_i16_le(self.yacc);
27399        __tmp.put_i16_le(self.zacc);
27400        __tmp.put_i16_le(self.xgyro);
27401        __tmp.put_i16_le(self.ygyro);
27402        __tmp.put_i16_le(self.zgyro);
27403        __tmp.put_i16_le(self.xmag);
27404        __tmp.put_i16_le(self.ymag);
27405        __tmp.put_i16_le(self.zmag);
27406        if matches!(version, MavlinkVersion::V2) {
27407            __tmp.put_i16_le(self.temperature);
27408            let len = __tmp.len();
27409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27410        } else {
27411            __tmp.len()
27412        }
27413    }
27414}
27415#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27416#[doc = ""]
27417#[doc = "ID: 116"]
27418#[derive(Debug, Clone, PartialEq)]
27419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27421#[cfg_attr(feature = "ts", derive(TS))]
27422#[cfg_attr(feature = "ts", ts(export))]
27423pub struct SCALED_IMU2_DATA {
27424    #[doc = "Timestamp (time since system boot)."]
27425    pub time_boot_ms: u32,
27426    #[doc = "X acceleration"]
27427    pub xacc: i16,
27428    #[doc = "Y acceleration"]
27429    pub yacc: i16,
27430    #[doc = "Z acceleration"]
27431    pub zacc: i16,
27432    #[doc = "Angular speed around X axis"]
27433    pub xgyro: i16,
27434    #[doc = "Angular speed around Y axis"]
27435    pub ygyro: i16,
27436    #[doc = "Angular speed around Z axis"]
27437    pub zgyro: i16,
27438    #[doc = "X Magnetic field"]
27439    pub xmag: i16,
27440    #[doc = "Y Magnetic field"]
27441    pub ymag: i16,
27442    #[doc = "Z Magnetic field"]
27443    pub zmag: i16,
27444    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27445    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27446    pub temperature: i16,
27447}
27448impl SCALED_IMU2_DATA {
27449    pub const ENCODED_LEN: usize = 24usize;
27450    pub const DEFAULT: Self = Self {
27451        time_boot_ms: 0_u32,
27452        xacc: 0_i16,
27453        yacc: 0_i16,
27454        zacc: 0_i16,
27455        xgyro: 0_i16,
27456        ygyro: 0_i16,
27457        zgyro: 0_i16,
27458        xmag: 0_i16,
27459        ymag: 0_i16,
27460        zmag: 0_i16,
27461        temperature: 0_i16,
27462    };
27463    #[cfg(feature = "arbitrary")]
27464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27465        use arbitrary::{Arbitrary, Unstructured};
27466        let mut buf = [0u8; 1024];
27467        rng.fill_bytes(&mut buf);
27468        let mut unstructured = Unstructured::new(&buf);
27469        Self::arbitrary(&mut unstructured).unwrap_or_default()
27470    }
27471}
27472impl Default for SCALED_IMU2_DATA {
27473    fn default() -> Self {
27474        Self::DEFAULT.clone()
27475    }
27476}
27477impl MessageData for SCALED_IMU2_DATA {
27478    type Message = MavMessage;
27479    const ID: u32 = 116u32;
27480    const NAME: &'static str = "SCALED_IMU2";
27481    const EXTRA_CRC: u8 = 76u8;
27482    const ENCODED_LEN: usize = 24usize;
27483    fn deser(
27484        _version: MavlinkVersion,
27485        __input: &[u8],
27486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27487        let avail_len = __input.len();
27488        let mut payload_buf = [0; Self::ENCODED_LEN];
27489        let mut buf = if avail_len < Self::ENCODED_LEN {
27490            payload_buf[0..avail_len].copy_from_slice(__input);
27491            Bytes::new(&payload_buf)
27492        } else {
27493            Bytes::new(__input)
27494        };
27495        let mut __struct = Self::default();
27496        __struct.time_boot_ms = buf.get_u32_le();
27497        __struct.xacc = buf.get_i16_le();
27498        __struct.yacc = buf.get_i16_le();
27499        __struct.zacc = buf.get_i16_le();
27500        __struct.xgyro = buf.get_i16_le();
27501        __struct.ygyro = buf.get_i16_le();
27502        __struct.zgyro = buf.get_i16_le();
27503        __struct.xmag = buf.get_i16_le();
27504        __struct.ymag = buf.get_i16_le();
27505        __struct.zmag = buf.get_i16_le();
27506        __struct.temperature = buf.get_i16_le();
27507        Ok(__struct)
27508    }
27509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27510        let mut __tmp = BytesMut::new(bytes);
27511        #[allow(clippy::absurd_extreme_comparisons)]
27512        #[allow(unused_comparisons)]
27513        if __tmp.remaining() < Self::ENCODED_LEN {
27514            panic!(
27515                "buffer is too small (need {} bytes, but got {})",
27516                Self::ENCODED_LEN,
27517                __tmp.remaining(),
27518            )
27519        }
27520        __tmp.put_u32_le(self.time_boot_ms);
27521        __tmp.put_i16_le(self.xacc);
27522        __tmp.put_i16_le(self.yacc);
27523        __tmp.put_i16_le(self.zacc);
27524        __tmp.put_i16_le(self.xgyro);
27525        __tmp.put_i16_le(self.ygyro);
27526        __tmp.put_i16_le(self.zgyro);
27527        __tmp.put_i16_le(self.xmag);
27528        __tmp.put_i16_le(self.ymag);
27529        __tmp.put_i16_le(self.zmag);
27530        if matches!(version, MavlinkVersion::V2) {
27531            __tmp.put_i16_le(self.temperature);
27532            let len = __tmp.len();
27533            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27534        } else {
27535            __tmp.len()
27536        }
27537    }
27538}
27539#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27540#[doc = ""]
27541#[doc = "ID: 129"]
27542#[derive(Debug, Clone, PartialEq)]
27543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27545#[cfg_attr(feature = "ts", derive(TS))]
27546#[cfg_attr(feature = "ts", ts(export))]
27547pub struct SCALED_IMU3_DATA {
27548    #[doc = "Timestamp (time since system boot)."]
27549    pub time_boot_ms: u32,
27550    #[doc = "X acceleration"]
27551    pub xacc: i16,
27552    #[doc = "Y acceleration"]
27553    pub yacc: i16,
27554    #[doc = "Z acceleration"]
27555    pub zacc: i16,
27556    #[doc = "Angular speed around X axis"]
27557    pub xgyro: i16,
27558    #[doc = "Angular speed around Y axis"]
27559    pub ygyro: i16,
27560    #[doc = "Angular speed around Z axis"]
27561    pub zgyro: i16,
27562    #[doc = "X Magnetic field"]
27563    pub xmag: i16,
27564    #[doc = "Y Magnetic field"]
27565    pub ymag: i16,
27566    #[doc = "Z Magnetic field"]
27567    pub zmag: i16,
27568    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27569    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27570    pub temperature: i16,
27571}
27572impl SCALED_IMU3_DATA {
27573    pub const ENCODED_LEN: usize = 24usize;
27574    pub const DEFAULT: Self = Self {
27575        time_boot_ms: 0_u32,
27576        xacc: 0_i16,
27577        yacc: 0_i16,
27578        zacc: 0_i16,
27579        xgyro: 0_i16,
27580        ygyro: 0_i16,
27581        zgyro: 0_i16,
27582        xmag: 0_i16,
27583        ymag: 0_i16,
27584        zmag: 0_i16,
27585        temperature: 0_i16,
27586    };
27587    #[cfg(feature = "arbitrary")]
27588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27589        use arbitrary::{Arbitrary, Unstructured};
27590        let mut buf = [0u8; 1024];
27591        rng.fill_bytes(&mut buf);
27592        let mut unstructured = Unstructured::new(&buf);
27593        Self::arbitrary(&mut unstructured).unwrap_or_default()
27594    }
27595}
27596impl Default for SCALED_IMU3_DATA {
27597    fn default() -> Self {
27598        Self::DEFAULT.clone()
27599    }
27600}
27601impl MessageData for SCALED_IMU3_DATA {
27602    type Message = MavMessage;
27603    const ID: u32 = 129u32;
27604    const NAME: &'static str = "SCALED_IMU3";
27605    const EXTRA_CRC: u8 = 46u8;
27606    const ENCODED_LEN: usize = 24usize;
27607    fn deser(
27608        _version: MavlinkVersion,
27609        __input: &[u8],
27610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27611        let avail_len = __input.len();
27612        let mut payload_buf = [0; Self::ENCODED_LEN];
27613        let mut buf = if avail_len < Self::ENCODED_LEN {
27614            payload_buf[0..avail_len].copy_from_slice(__input);
27615            Bytes::new(&payload_buf)
27616        } else {
27617            Bytes::new(__input)
27618        };
27619        let mut __struct = Self::default();
27620        __struct.time_boot_ms = buf.get_u32_le();
27621        __struct.xacc = buf.get_i16_le();
27622        __struct.yacc = buf.get_i16_le();
27623        __struct.zacc = buf.get_i16_le();
27624        __struct.xgyro = buf.get_i16_le();
27625        __struct.ygyro = buf.get_i16_le();
27626        __struct.zgyro = buf.get_i16_le();
27627        __struct.xmag = buf.get_i16_le();
27628        __struct.ymag = buf.get_i16_le();
27629        __struct.zmag = buf.get_i16_le();
27630        __struct.temperature = buf.get_i16_le();
27631        Ok(__struct)
27632    }
27633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27634        let mut __tmp = BytesMut::new(bytes);
27635        #[allow(clippy::absurd_extreme_comparisons)]
27636        #[allow(unused_comparisons)]
27637        if __tmp.remaining() < Self::ENCODED_LEN {
27638            panic!(
27639                "buffer is too small (need {} bytes, but got {})",
27640                Self::ENCODED_LEN,
27641                __tmp.remaining(),
27642            )
27643        }
27644        __tmp.put_u32_le(self.time_boot_ms);
27645        __tmp.put_i16_le(self.xacc);
27646        __tmp.put_i16_le(self.yacc);
27647        __tmp.put_i16_le(self.zacc);
27648        __tmp.put_i16_le(self.xgyro);
27649        __tmp.put_i16_le(self.ygyro);
27650        __tmp.put_i16_le(self.zgyro);
27651        __tmp.put_i16_le(self.xmag);
27652        __tmp.put_i16_le(self.ymag);
27653        __tmp.put_i16_le(self.zmag);
27654        if matches!(version, MavlinkVersion::V2) {
27655            __tmp.put_i16_le(self.temperature);
27656            let len = __tmp.len();
27657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27658        } else {
27659            __tmp.len()
27660        }
27661    }
27662}
27663#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27664#[doc = ""]
27665#[doc = "ID: 29"]
27666#[derive(Debug, Clone, PartialEq)]
27667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27669#[cfg_attr(feature = "ts", derive(TS))]
27670#[cfg_attr(feature = "ts", ts(export))]
27671pub struct SCALED_PRESSURE_DATA {
27672    #[doc = "Timestamp (time since system boot)."]
27673    pub time_boot_ms: u32,
27674    #[doc = "Absolute pressure"]
27675    pub press_abs: f32,
27676    #[doc = "Differential pressure 1"]
27677    pub press_diff: f32,
27678    #[doc = "Absolute pressure temperature"]
27679    pub temperature: i16,
27680    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27681    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27682    pub temperature_press_diff: i16,
27683}
27684impl SCALED_PRESSURE_DATA {
27685    pub const ENCODED_LEN: usize = 16usize;
27686    pub const DEFAULT: Self = Self {
27687        time_boot_ms: 0_u32,
27688        press_abs: 0.0_f32,
27689        press_diff: 0.0_f32,
27690        temperature: 0_i16,
27691        temperature_press_diff: 0_i16,
27692    };
27693    #[cfg(feature = "arbitrary")]
27694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27695        use arbitrary::{Arbitrary, Unstructured};
27696        let mut buf = [0u8; 1024];
27697        rng.fill_bytes(&mut buf);
27698        let mut unstructured = Unstructured::new(&buf);
27699        Self::arbitrary(&mut unstructured).unwrap_or_default()
27700    }
27701}
27702impl Default for SCALED_PRESSURE_DATA {
27703    fn default() -> Self {
27704        Self::DEFAULT.clone()
27705    }
27706}
27707impl MessageData for SCALED_PRESSURE_DATA {
27708    type Message = MavMessage;
27709    const ID: u32 = 29u32;
27710    const NAME: &'static str = "SCALED_PRESSURE";
27711    const EXTRA_CRC: u8 = 115u8;
27712    const ENCODED_LEN: usize = 16usize;
27713    fn deser(
27714        _version: MavlinkVersion,
27715        __input: &[u8],
27716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27717        let avail_len = __input.len();
27718        let mut payload_buf = [0; Self::ENCODED_LEN];
27719        let mut buf = if avail_len < Self::ENCODED_LEN {
27720            payload_buf[0..avail_len].copy_from_slice(__input);
27721            Bytes::new(&payload_buf)
27722        } else {
27723            Bytes::new(__input)
27724        };
27725        let mut __struct = Self::default();
27726        __struct.time_boot_ms = buf.get_u32_le();
27727        __struct.press_abs = buf.get_f32_le();
27728        __struct.press_diff = buf.get_f32_le();
27729        __struct.temperature = buf.get_i16_le();
27730        __struct.temperature_press_diff = buf.get_i16_le();
27731        Ok(__struct)
27732    }
27733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27734        let mut __tmp = BytesMut::new(bytes);
27735        #[allow(clippy::absurd_extreme_comparisons)]
27736        #[allow(unused_comparisons)]
27737        if __tmp.remaining() < Self::ENCODED_LEN {
27738            panic!(
27739                "buffer is too small (need {} bytes, but got {})",
27740                Self::ENCODED_LEN,
27741                __tmp.remaining(),
27742            )
27743        }
27744        __tmp.put_u32_le(self.time_boot_ms);
27745        __tmp.put_f32_le(self.press_abs);
27746        __tmp.put_f32_le(self.press_diff);
27747        __tmp.put_i16_le(self.temperature);
27748        if matches!(version, MavlinkVersion::V2) {
27749            __tmp.put_i16_le(self.temperature_press_diff);
27750            let len = __tmp.len();
27751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27752        } else {
27753            __tmp.len()
27754        }
27755    }
27756}
27757#[doc = "Barometer readings for 2nd barometer."]
27758#[doc = ""]
27759#[doc = "ID: 137"]
27760#[derive(Debug, Clone, PartialEq)]
27761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27763#[cfg_attr(feature = "ts", derive(TS))]
27764#[cfg_attr(feature = "ts", ts(export))]
27765pub struct SCALED_PRESSURE2_DATA {
27766    #[doc = "Timestamp (time since system boot)."]
27767    pub time_boot_ms: u32,
27768    #[doc = "Absolute pressure"]
27769    pub press_abs: f32,
27770    #[doc = "Differential pressure"]
27771    pub press_diff: f32,
27772    #[doc = "Absolute pressure temperature"]
27773    pub temperature: i16,
27774    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27776    pub temperature_press_diff: i16,
27777}
27778impl SCALED_PRESSURE2_DATA {
27779    pub const ENCODED_LEN: usize = 16usize;
27780    pub const DEFAULT: Self = Self {
27781        time_boot_ms: 0_u32,
27782        press_abs: 0.0_f32,
27783        press_diff: 0.0_f32,
27784        temperature: 0_i16,
27785        temperature_press_diff: 0_i16,
27786    };
27787    #[cfg(feature = "arbitrary")]
27788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27789        use arbitrary::{Arbitrary, Unstructured};
27790        let mut buf = [0u8; 1024];
27791        rng.fill_bytes(&mut buf);
27792        let mut unstructured = Unstructured::new(&buf);
27793        Self::arbitrary(&mut unstructured).unwrap_or_default()
27794    }
27795}
27796impl Default for SCALED_PRESSURE2_DATA {
27797    fn default() -> Self {
27798        Self::DEFAULT.clone()
27799    }
27800}
27801impl MessageData for SCALED_PRESSURE2_DATA {
27802    type Message = MavMessage;
27803    const ID: u32 = 137u32;
27804    const NAME: &'static str = "SCALED_PRESSURE2";
27805    const EXTRA_CRC: u8 = 195u8;
27806    const ENCODED_LEN: usize = 16usize;
27807    fn deser(
27808        _version: MavlinkVersion,
27809        __input: &[u8],
27810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27811        let avail_len = __input.len();
27812        let mut payload_buf = [0; Self::ENCODED_LEN];
27813        let mut buf = if avail_len < Self::ENCODED_LEN {
27814            payload_buf[0..avail_len].copy_from_slice(__input);
27815            Bytes::new(&payload_buf)
27816        } else {
27817            Bytes::new(__input)
27818        };
27819        let mut __struct = Self::default();
27820        __struct.time_boot_ms = buf.get_u32_le();
27821        __struct.press_abs = buf.get_f32_le();
27822        __struct.press_diff = buf.get_f32_le();
27823        __struct.temperature = buf.get_i16_le();
27824        __struct.temperature_press_diff = buf.get_i16_le();
27825        Ok(__struct)
27826    }
27827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27828        let mut __tmp = BytesMut::new(bytes);
27829        #[allow(clippy::absurd_extreme_comparisons)]
27830        #[allow(unused_comparisons)]
27831        if __tmp.remaining() < Self::ENCODED_LEN {
27832            panic!(
27833                "buffer is too small (need {} bytes, but got {})",
27834                Self::ENCODED_LEN,
27835                __tmp.remaining(),
27836            )
27837        }
27838        __tmp.put_u32_le(self.time_boot_ms);
27839        __tmp.put_f32_le(self.press_abs);
27840        __tmp.put_f32_le(self.press_diff);
27841        __tmp.put_i16_le(self.temperature);
27842        if matches!(version, MavlinkVersion::V2) {
27843            __tmp.put_i16_le(self.temperature_press_diff);
27844            let len = __tmp.len();
27845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27846        } else {
27847            __tmp.len()
27848        }
27849    }
27850}
27851#[doc = "Barometer readings for 3rd barometer."]
27852#[doc = ""]
27853#[doc = "ID: 143"]
27854#[derive(Debug, Clone, PartialEq)]
27855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27857#[cfg_attr(feature = "ts", derive(TS))]
27858#[cfg_attr(feature = "ts", ts(export))]
27859pub struct SCALED_PRESSURE3_DATA {
27860    #[doc = "Timestamp (time since system boot)."]
27861    pub time_boot_ms: u32,
27862    #[doc = "Absolute pressure"]
27863    pub press_abs: f32,
27864    #[doc = "Differential pressure"]
27865    pub press_diff: f32,
27866    #[doc = "Absolute pressure temperature"]
27867    pub temperature: i16,
27868    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27869    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27870    pub temperature_press_diff: i16,
27871}
27872impl SCALED_PRESSURE3_DATA {
27873    pub const ENCODED_LEN: usize = 16usize;
27874    pub const DEFAULT: Self = Self {
27875        time_boot_ms: 0_u32,
27876        press_abs: 0.0_f32,
27877        press_diff: 0.0_f32,
27878        temperature: 0_i16,
27879        temperature_press_diff: 0_i16,
27880    };
27881    #[cfg(feature = "arbitrary")]
27882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27883        use arbitrary::{Arbitrary, Unstructured};
27884        let mut buf = [0u8; 1024];
27885        rng.fill_bytes(&mut buf);
27886        let mut unstructured = Unstructured::new(&buf);
27887        Self::arbitrary(&mut unstructured).unwrap_or_default()
27888    }
27889}
27890impl Default for SCALED_PRESSURE3_DATA {
27891    fn default() -> Self {
27892        Self::DEFAULT.clone()
27893    }
27894}
27895impl MessageData for SCALED_PRESSURE3_DATA {
27896    type Message = MavMessage;
27897    const ID: u32 = 143u32;
27898    const NAME: &'static str = "SCALED_PRESSURE3";
27899    const EXTRA_CRC: u8 = 131u8;
27900    const ENCODED_LEN: usize = 16usize;
27901    fn deser(
27902        _version: MavlinkVersion,
27903        __input: &[u8],
27904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27905        let avail_len = __input.len();
27906        let mut payload_buf = [0; Self::ENCODED_LEN];
27907        let mut buf = if avail_len < Self::ENCODED_LEN {
27908            payload_buf[0..avail_len].copy_from_slice(__input);
27909            Bytes::new(&payload_buf)
27910        } else {
27911            Bytes::new(__input)
27912        };
27913        let mut __struct = Self::default();
27914        __struct.time_boot_ms = buf.get_u32_le();
27915        __struct.press_abs = buf.get_f32_le();
27916        __struct.press_diff = buf.get_f32_le();
27917        __struct.temperature = buf.get_i16_le();
27918        __struct.temperature_press_diff = buf.get_i16_le();
27919        Ok(__struct)
27920    }
27921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27922        let mut __tmp = BytesMut::new(bytes);
27923        #[allow(clippy::absurd_extreme_comparisons)]
27924        #[allow(unused_comparisons)]
27925        if __tmp.remaining() < Self::ENCODED_LEN {
27926            panic!(
27927                "buffer is too small (need {} bytes, but got {})",
27928                Self::ENCODED_LEN,
27929                __tmp.remaining(),
27930            )
27931        }
27932        __tmp.put_u32_le(self.time_boot_ms);
27933        __tmp.put_f32_le(self.press_abs);
27934        __tmp.put_f32_le(self.press_diff);
27935        __tmp.put_i16_le(self.temperature);
27936        if matches!(version, MavlinkVersion::V2) {
27937            __tmp.put_i16_le(self.temperature_press_diff);
27938            let len = __tmp.len();
27939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27940        } else {
27941            __tmp.len()
27942        }
27943    }
27944}
27945#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27946#[doc = ""]
27947#[doc = "ID: 126"]
27948#[derive(Debug, Clone, PartialEq)]
27949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27951#[cfg_attr(feature = "ts", derive(TS))]
27952#[cfg_attr(feature = "ts", ts(export))]
27953pub struct SERIAL_CONTROL_DATA {
27954    #[doc = "Baudrate of transfer. Zero means no change."]
27955    pub baudrate: u32,
27956    #[doc = "Timeout for reply data"]
27957    pub timeout: u16,
27958    #[doc = "Serial control device type."]
27959    pub device: SerialControlDev,
27960    #[doc = "Bitmap of serial control flags."]
27961    pub flags: SerialControlFlag,
27962    #[doc = "how many bytes in this transfer"]
27963    pub count: u8,
27964    #[doc = "serial data"]
27965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27966    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27967    pub data: [u8; 70],
27968    #[doc = "System ID"]
27969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27970    pub target_system: u8,
27971    #[doc = "Component ID"]
27972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27973    pub target_component: u8,
27974}
27975impl SERIAL_CONTROL_DATA {
27976    pub const ENCODED_LEN: usize = 81usize;
27977    pub const DEFAULT: Self = Self {
27978        baudrate: 0_u32,
27979        timeout: 0_u16,
27980        device: SerialControlDev::DEFAULT,
27981        flags: SerialControlFlag::DEFAULT,
27982        count: 0_u8,
27983        data: [0_u8; 70usize],
27984        target_system: 0_u8,
27985        target_component: 0_u8,
27986    };
27987    #[cfg(feature = "arbitrary")]
27988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27989        use arbitrary::{Arbitrary, Unstructured};
27990        let mut buf = [0u8; 1024];
27991        rng.fill_bytes(&mut buf);
27992        let mut unstructured = Unstructured::new(&buf);
27993        Self::arbitrary(&mut unstructured).unwrap_or_default()
27994    }
27995}
27996impl Default for SERIAL_CONTROL_DATA {
27997    fn default() -> Self {
27998        Self::DEFAULT.clone()
27999    }
28000}
28001impl MessageData for SERIAL_CONTROL_DATA {
28002    type Message = MavMessage;
28003    const ID: u32 = 126u32;
28004    const NAME: &'static str = "SERIAL_CONTROL";
28005    const EXTRA_CRC: u8 = 220u8;
28006    const ENCODED_LEN: usize = 81usize;
28007    fn deser(
28008        _version: MavlinkVersion,
28009        __input: &[u8],
28010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28011        let avail_len = __input.len();
28012        let mut payload_buf = [0; Self::ENCODED_LEN];
28013        let mut buf = if avail_len < Self::ENCODED_LEN {
28014            payload_buf[0..avail_len].copy_from_slice(__input);
28015            Bytes::new(&payload_buf)
28016        } else {
28017            Bytes::new(__input)
28018        };
28019        let mut __struct = Self::default();
28020        __struct.baudrate = buf.get_u32_le();
28021        __struct.timeout = buf.get_u16_le();
28022        let tmp = buf.get_u8();
28023        __struct.device =
28024            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28025                enum_type: "SerialControlDev",
28026                value: tmp as u64,
28027            })?;
28028        let tmp = buf.get_u8();
28029        __struct.flags = SerialControlFlag::from_bits(tmp).ok_or(
28030            ::mavlink_core::error::ParserError::InvalidFlag {
28031                flag_type: "SerialControlFlag",
28032                value: tmp as u64,
28033            },
28034        )?;
28035        __struct.count = buf.get_u8();
28036        for v in &mut __struct.data {
28037            let val = buf.get_u8();
28038            *v = val;
28039        }
28040        __struct.target_system = buf.get_u8();
28041        __struct.target_component = buf.get_u8();
28042        Ok(__struct)
28043    }
28044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28045        let mut __tmp = BytesMut::new(bytes);
28046        #[allow(clippy::absurd_extreme_comparisons)]
28047        #[allow(unused_comparisons)]
28048        if __tmp.remaining() < Self::ENCODED_LEN {
28049            panic!(
28050                "buffer is too small (need {} bytes, but got {})",
28051                Self::ENCODED_LEN,
28052                __tmp.remaining(),
28053            )
28054        }
28055        __tmp.put_u32_le(self.baudrate);
28056        __tmp.put_u16_le(self.timeout);
28057        __tmp.put_u8(self.device as u8);
28058        __tmp.put_u8(self.flags.bits());
28059        __tmp.put_u8(self.count);
28060        for val in &self.data {
28061            __tmp.put_u8(*val);
28062        }
28063        if matches!(version, MavlinkVersion::V2) {
28064            __tmp.put_u8(self.target_system);
28065            __tmp.put_u8(self.target_component);
28066            let len = __tmp.len();
28067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28068        } else {
28069            __tmp.len()
28070        }
28071    }
28072}
28073#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28074#[doc = ""]
28075#[doc = "ID: 36"]
28076#[derive(Debug, Clone, PartialEq)]
28077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28079#[cfg_attr(feature = "ts", derive(TS))]
28080#[cfg_attr(feature = "ts", ts(export))]
28081pub struct SERVO_OUTPUT_RAW_DATA {
28082    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28083    pub time_usec: u32,
28084    #[doc = "Servo output 1 value"]
28085    pub servo1_raw: u16,
28086    #[doc = "Servo output 2 value"]
28087    pub servo2_raw: u16,
28088    #[doc = "Servo output 3 value"]
28089    pub servo3_raw: u16,
28090    #[doc = "Servo output 4 value"]
28091    pub servo4_raw: u16,
28092    #[doc = "Servo output 5 value"]
28093    pub servo5_raw: u16,
28094    #[doc = "Servo output 6 value"]
28095    pub servo6_raw: u16,
28096    #[doc = "Servo output 7 value"]
28097    pub servo7_raw: u16,
28098    #[doc = "Servo output 8 value"]
28099    pub servo8_raw: u16,
28100    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28101    pub port: u8,
28102    #[doc = "Servo output 9 value"]
28103    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28104    pub servo9_raw: u16,
28105    #[doc = "Servo output 10 value"]
28106    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28107    pub servo10_raw: u16,
28108    #[doc = "Servo output 11 value"]
28109    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28110    pub servo11_raw: u16,
28111    #[doc = "Servo output 12 value"]
28112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28113    pub servo12_raw: u16,
28114    #[doc = "Servo output 13 value"]
28115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28116    pub servo13_raw: u16,
28117    #[doc = "Servo output 14 value"]
28118    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28119    pub servo14_raw: u16,
28120    #[doc = "Servo output 15 value"]
28121    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28122    pub servo15_raw: u16,
28123    #[doc = "Servo output 16 value"]
28124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28125    pub servo16_raw: u16,
28126}
28127impl SERVO_OUTPUT_RAW_DATA {
28128    pub const ENCODED_LEN: usize = 37usize;
28129    pub const DEFAULT: Self = Self {
28130        time_usec: 0_u32,
28131        servo1_raw: 0_u16,
28132        servo2_raw: 0_u16,
28133        servo3_raw: 0_u16,
28134        servo4_raw: 0_u16,
28135        servo5_raw: 0_u16,
28136        servo6_raw: 0_u16,
28137        servo7_raw: 0_u16,
28138        servo8_raw: 0_u16,
28139        port: 0_u8,
28140        servo9_raw: 0_u16,
28141        servo10_raw: 0_u16,
28142        servo11_raw: 0_u16,
28143        servo12_raw: 0_u16,
28144        servo13_raw: 0_u16,
28145        servo14_raw: 0_u16,
28146        servo15_raw: 0_u16,
28147        servo16_raw: 0_u16,
28148    };
28149    #[cfg(feature = "arbitrary")]
28150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28151        use arbitrary::{Arbitrary, Unstructured};
28152        let mut buf = [0u8; 1024];
28153        rng.fill_bytes(&mut buf);
28154        let mut unstructured = Unstructured::new(&buf);
28155        Self::arbitrary(&mut unstructured).unwrap_or_default()
28156    }
28157}
28158impl Default for SERVO_OUTPUT_RAW_DATA {
28159    fn default() -> Self {
28160        Self::DEFAULT.clone()
28161    }
28162}
28163impl MessageData for SERVO_OUTPUT_RAW_DATA {
28164    type Message = MavMessage;
28165    const ID: u32 = 36u32;
28166    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28167    const EXTRA_CRC: u8 = 222u8;
28168    const ENCODED_LEN: usize = 37usize;
28169    fn deser(
28170        _version: MavlinkVersion,
28171        __input: &[u8],
28172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28173        let avail_len = __input.len();
28174        let mut payload_buf = [0; Self::ENCODED_LEN];
28175        let mut buf = if avail_len < Self::ENCODED_LEN {
28176            payload_buf[0..avail_len].copy_from_slice(__input);
28177            Bytes::new(&payload_buf)
28178        } else {
28179            Bytes::new(__input)
28180        };
28181        let mut __struct = Self::default();
28182        __struct.time_usec = buf.get_u32_le();
28183        __struct.servo1_raw = buf.get_u16_le();
28184        __struct.servo2_raw = buf.get_u16_le();
28185        __struct.servo3_raw = buf.get_u16_le();
28186        __struct.servo4_raw = buf.get_u16_le();
28187        __struct.servo5_raw = buf.get_u16_le();
28188        __struct.servo6_raw = buf.get_u16_le();
28189        __struct.servo7_raw = buf.get_u16_le();
28190        __struct.servo8_raw = buf.get_u16_le();
28191        __struct.port = buf.get_u8();
28192        __struct.servo9_raw = buf.get_u16_le();
28193        __struct.servo10_raw = buf.get_u16_le();
28194        __struct.servo11_raw = buf.get_u16_le();
28195        __struct.servo12_raw = buf.get_u16_le();
28196        __struct.servo13_raw = buf.get_u16_le();
28197        __struct.servo14_raw = buf.get_u16_le();
28198        __struct.servo15_raw = buf.get_u16_le();
28199        __struct.servo16_raw = buf.get_u16_le();
28200        Ok(__struct)
28201    }
28202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28203        let mut __tmp = BytesMut::new(bytes);
28204        #[allow(clippy::absurd_extreme_comparisons)]
28205        #[allow(unused_comparisons)]
28206        if __tmp.remaining() < Self::ENCODED_LEN {
28207            panic!(
28208                "buffer is too small (need {} bytes, but got {})",
28209                Self::ENCODED_LEN,
28210                __tmp.remaining(),
28211            )
28212        }
28213        __tmp.put_u32_le(self.time_usec);
28214        __tmp.put_u16_le(self.servo1_raw);
28215        __tmp.put_u16_le(self.servo2_raw);
28216        __tmp.put_u16_le(self.servo3_raw);
28217        __tmp.put_u16_le(self.servo4_raw);
28218        __tmp.put_u16_le(self.servo5_raw);
28219        __tmp.put_u16_le(self.servo6_raw);
28220        __tmp.put_u16_le(self.servo7_raw);
28221        __tmp.put_u16_le(self.servo8_raw);
28222        __tmp.put_u8(self.port);
28223        if matches!(version, MavlinkVersion::V2) {
28224            __tmp.put_u16_le(self.servo9_raw);
28225            __tmp.put_u16_le(self.servo10_raw);
28226            __tmp.put_u16_le(self.servo11_raw);
28227            __tmp.put_u16_le(self.servo12_raw);
28228            __tmp.put_u16_le(self.servo13_raw);
28229            __tmp.put_u16_le(self.servo14_raw);
28230            __tmp.put_u16_le(self.servo15_raw);
28231            __tmp.put_u16_le(self.servo16_raw);
28232            let len = __tmp.len();
28233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28234        } else {
28235            __tmp.len()
28236        }
28237    }
28238}
28239#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28240#[doc = ""]
28241#[doc = "ID: 256"]
28242#[derive(Debug, Clone, PartialEq)]
28243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28245#[cfg_attr(feature = "ts", derive(TS))]
28246#[cfg_attr(feature = "ts", ts(export))]
28247pub struct SETUP_SIGNING_DATA {
28248    #[doc = "initial timestamp"]
28249    pub initial_timestamp: u64,
28250    #[doc = "system id of the target"]
28251    pub target_system: u8,
28252    #[doc = "component ID of the target"]
28253    pub target_component: u8,
28254    #[doc = "signing key"]
28255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28257    pub secret_key: [u8; 32],
28258}
28259impl SETUP_SIGNING_DATA {
28260    pub const ENCODED_LEN: usize = 42usize;
28261    pub const DEFAULT: Self = Self {
28262        initial_timestamp: 0_u64,
28263        target_system: 0_u8,
28264        target_component: 0_u8,
28265        secret_key: [0_u8; 32usize],
28266    };
28267    #[cfg(feature = "arbitrary")]
28268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28269        use arbitrary::{Arbitrary, Unstructured};
28270        let mut buf = [0u8; 1024];
28271        rng.fill_bytes(&mut buf);
28272        let mut unstructured = Unstructured::new(&buf);
28273        Self::arbitrary(&mut unstructured).unwrap_or_default()
28274    }
28275}
28276impl Default for SETUP_SIGNING_DATA {
28277    fn default() -> Self {
28278        Self::DEFAULT.clone()
28279    }
28280}
28281impl MessageData for SETUP_SIGNING_DATA {
28282    type Message = MavMessage;
28283    const ID: u32 = 256u32;
28284    const NAME: &'static str = "SETUP_SIGNING";
28285    const EXTRA_CRC: u8 = 71u8;
28286    const ENCODED_LEN: usize = 42usize;
28287    fn deser(
28288        _version: MavlinkVersion,
28289        __input: &[u8],
28290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28291        let avail_len = __input.len();
28292        let mut payload_buf = [0; Self::ENCODED_LEN];
28293        let mut buf = if avail_len < Self::ENCODED_LEN {
28294            payload_buf[0..avail_len].copy_from_slice(__input);
28295            Bytes::new(&payload_buf)
28296        } else {
28297            Bytes::new(__input)
28298        };
28299        let mut __struct = Self::default();
28300        __struct.initial_timestamp = buf.get_u64_le();
28301        __struct.target_system = buf.get_u8();
28302        __struct.target_component = buf.get_u8();
28303        for v in &mut __struct.secret_key {
28304            let val = buf.get_u8();
28305            *v = val;
28306        }
28307        Ok(__struct)
28308    }
28309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28310        let mut __tmp = BytesMut::new(bytes);
28311        #[allow(clippy::absurd_extreme_comparisons)]
28312        #[allow(unused_comparisons)]
28313        if __tmp.remaining() < Self::ENCODED_LEN {
28314            panic!(
28315                "buffer is too small (need {} bytes, but got {})",
28316                Self::ENCODED_LEN,
28317                __tmp.remaining(),
28318            )
28319        }
28320        __tmp.put_u64_le(self.initial_timestamp);
28321        __tmp.put_u8(self.target_system);
28322        __tmp.put_u8(self.target_component);
28323        for val in &self.secret_key {
28324            __tmp.put_u8(*val);
28325        }
28326        if matches!(version, MavlinkVersion::V2) {
28327            let len = __tmp.len();
28328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28329        } else {
28330            __tmp.len()
28331        }
28332    }
28333}
28334#[doc = "Set the vehicle attitude and body angular rates."]
28335#[doc = ""]
28336#[doc = "ID: 139"]
28337#[derive(Debug, Clone, PartialEq)]
28338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28340#[cfg_attr(feature = "ts", derive(TS))]
28341#[cfg_attr(feature = "ts", ts(export))]
28342pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28343    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28344    pub time_usec: u64,
28345    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28347    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28348    pub controls: [f32; 8],
28349    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28350    pub group_mlx: u8,
28351    #[doc = "System ID"]
28352    pub target_system: u8,
28353    #[doc = "Component ID"]
28354    pub target_component: u8,
28355}
28356impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28357    pub const ENCODED_LEN: usize = 43usize;
28358    pub const DEFAULT: Self = Self {
28359        time_usec: 0_u64,
28360        controls: [0.0_f32; 8usize],
28361        group_mlx: 0_u8,
28362        target_system: 0_u8,
28363        target_component: 0_u8,
28364    };
28365    #[cfg(feature = "arbitrary")]
28366    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28367        use arbitrary::{Arbitrary, Unstructured};
28368        let mut buf = [0u8; 1024];
28369        rng.fill_bytes(&mut buf);
28370        let mut unstructured = Unstructured::new(&buf);
28371        Self::arbitrary(&mut unstructured).unwrap_or_default()
28372    }
28373}
28374impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28375    fn default() -> Self {
28376        Self::DEFAULT.clone()
28377    }
28378}
28379impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28380    type Message = MavMessage;
28381    const ID: u32 = 139u32;
28382    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28383    const EXTRA_CRC: u8 = 168u8;
28384    const ENCODED_LEN: usize = 43usize;
28385    fn deser(
28386        _version: MavlinkVersion,
28387        __input: &[u8],
28388    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28389        let avail_len = __input.len();
28390        let mut payload_buf = [0; Self::ENCODED_LEN];
28391        let mut buf = if avail_len < Self::ENCODED_LEN {
28392            payload_buf[0..avail_len].copy_from_slice(__input);
28393            Bytes::new(&payload_buf)
28394        } else {
28395            Bytes::new(__input)
28396        };
28397        let mut __struct = Self::default();
28398        __struct.time_usec = buf.get_u64_le();
28399        for v in &mut __struct.controls {
28400            let val = buf.get_f32_le();
28401            *v = val;
28402        }
28403        __struct.group_mlx = buf.get_u8();
28404        __struct.target_system = buf.get_u8();
28405        __struct.target_component = buf.get_u8();
28406        Ok(__struct)
28407    }
28408    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28409        let mut __tmp = BytesMut::new(bytes);
28410        #[allow(clippy::absurd_extreme_comparisons)]
28411        #[allow(unused_comparisons)]
28412        if __tmp.remaining() < Self::ENCODED_LEN {
28413            panic!(
28414                "buffer is too small (need {} bytes, but got {})",
28415                Self::ENCODED_LEN,
28416                __tmp.remaining(),
28417            )
28418        }
28419        __tmp.put_u64_le(self.time_usec);
28420        for val in &self.controls {
28421            __tmp.put_f32_le(*val);
28422        }
28423        __tmp.put_u8(self.group_mlx);
28424        __tmp.put_u8(self.target_system);
28425        __tmp.put_u8(self.target_component);
28426        if matches!(version, MavlinkVersion::V2) {
28427            let len = __tmp.len();
28428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28429        } else {
28430            __tmp.len()
28431        }
28432    }
28433}
28434#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28435#[doc = ""]
28436#[doc = "ID: 82"]
28437#[derive(Debug, Clone, PartialEq)]
28438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28440#[cfg_attr(feature = "ts", derive(TS))]
28441#[cfg_attr(feature = "ts", ts(export))]
28442pub struct SET_ATTITUDE_TARGET_DATA {
28443    #[doc = "Timestamp (time since system boot)."]
28444    pub time_boot_ms: u32,
28445    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28447    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28448    pub q: [f32; 4],
28449    #[doc = "Body roll rate"]
28450    pub body_roll_rate: f32,
28451    #[doc = "Body pitch rate"]
28452    pub body_pitch_rate: f32,
28453    #[doc = "Body yaw rate"]
28454    pub body_yaw_rate: f32,
28455    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28456    pub thrust: f32,
28457    #[doc = "System ID"]
28458    pub target_system: u8,
28459    #[doc = "Component ID"]
28460    pub target_component: u8,
28461    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28462    pub type_mask: AttitudeTargetTypemask,
28463    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28464    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28467    pub thrust_body: [f32; 3],
28468}
28469impl SET_ATTITUDE_TARGET_DATA {
28470    pub const ENCODED_LEN: usize = 51usize;
28471    pub const DEFAULT: Self = Self {
28472        time_boot_ms: 0_u32,
28473        q: [0.0_f32; 4usize],
28474        body_roll_rate: 0.0_f32,
28475        body_pitch_rate: 0.0_f32,
28476        body_yaw_rate: 0.0_f32,
28477        thrust: 0.0_f32,
28478        target_system: 0_u8,
28479        target_component: 0_u8,
28480        type_mask: AttitudeTargetTypemask::DEFAULT,
28481        thrust_body: [0.0_f32; 3usize],
28482    };
28483    #[cfg(feature = "arbitrary")]
28484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28485        use arbitrary::{Arbitrary, Unstructured};
28486        let mut buf = [0u8; 1024];
28487        rng.fill_bytes(&mut buf);
28488        let mut unstructured = Unstructured::new(&buf);
28489        Self::arbitrary(&mut unstructured).unwrap_or_default()
28490    }
28491}
28492impl Default for SET_ATTITUDE_TARGET_DATA {
28493    fn default() -> Self {
28494        Self::DEFAULT.clone()
28495    }
28496}
28497impl MessageData for SET_ATTITUDE_TARGET_DATA {
28498    type Message = MavMessage;
28499    const ID: u32 = 82u32;
28500    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28501    const EXTRA_CRC: u8 = 49u8;
28502    const ENCODED_LEN: usize = 51usize;
28503    fn deser(
28504        _version: MavlinkVersion,
28505        __input: &[u8],
28506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28507        let avail_len = __input.len();
28508        let mut payload_buf = [0; Self::ENCODED_LEN];
28509        let mut buf = if avail_len < Self::ENCODED_LEN {
28510            payload_buf[0..avail_len].copy_from_slice(__input);
28511            Bytes::new(&payload_buf)
28512        } else {
28513            Bytes::new(__input)
28514        };
28515        let mut __struct = Self::default();
28516        __struct.time_boot_ms = buf.get_u32_le();
28517        for v in &mut __struct.q {
28518            let val = buf.get_f32_le();
28519            *v = val;
28520        }
28521        __struct.body_roll_rate = buf.get_f32_le();
28522        __struct.body_pitch_rate = buf.get_f32_le();
28523        __struct.body_yaw_rate = buf.get_f32_le();
28524        __struct.thrust = buf.get_f32_le();
28525        __struct.target_system = buf.get_u8();
28526        __struct.target_component = buf.get_u8();
28527        let tmp = buf.get_u8();
28528        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
28529            ::mavlink_core::error::ParserError::InvalidFlag {
28530                flag_type: "AttitudeTargetTypemask",
28531                value: tmp as u64,
28532            },
28533        )?;
28534        for v in &mut __struct.thrust_body {
28535            let val = buf.get_f32_le();
28536            *v = val;
28537        }
28538        Ok(__struct)
28539    }
28540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28541        let mut __tmp = BytesMut::new(bytes);
28542        #[allow(clippy::absurd_extreme_comparisons)]
28543        #[allow(unused_comparisons)]
28544        if __tmp.remaining() < Self::ENCODED_LEN {
28545            panic!(
28546                "buffer is too small (need {} bytes, but got {})",
28547                Self::ENCODED_LEN,
28548                __tmp.remaining(),
28549            )
28550        }
28551        __tmp.put_u32_le(self.time_boot_ms);
28552        for val in &self.q {
28553            __tmp.put_f32_le(*val);
28554        }
28555        __tmp.put_f32_le(self.body_roll_rate);
28556        __tmp.put_f32_le(self.body_pitch_rate);
28557        __tmp.put_f32_le(self.body_yaw_rate);
28558        __tmp.put_f32_le(self.thrust);
28559        __tmp.put_u8(self.target_system);
28560        __tmp.put_u8(self.target_component);
28561        __tmp.put_u8(self.type_mask.bits());
28562        if matches!(version, MavlinkVersion::V2) {
28563            for val in &self.thrust_body {
28564                __tmp.put_f32_le(*val);
28565            }
28566            let len = __tmp.len();
28567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28568        } else {
28569            __tmp.len()
28570        }
28571    }
28572}
28573#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28574#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28575#[doc = ""]
28576#[doc = "ID: 48"]
28577#[derive(Debug, Clone, PartialEq)]
28578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28580#[cfg_attr(feature = "ts", derive(TS))]
28581#[cfg_attr(feature = "ts", ts(export))]
28582pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28583    #[doc = "Latitude (WGS84)"]
28584    pub latitude: i32,
28585    #[doc = "Longitude (WGS84)"]
28586    pub longitude: i32,
28587    #[doc = "Altitude (MSL). Positive for up."]
28588    pub altitude: i32,
28589    #[doc = "System ID"]
28590    pub target_system: u8,
28591    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28593    pub time_usec: u64,
28594}
28595impl SET_GPS_GLOBAL_ORIGIN_DATA {
28596    pub const ENCODED_LEN: usize = 21usize;
28597    pub const DEFAULT: Self = Self {
28598        latitude: 0_i32,
28599        longitude: 0_i32,
28600        altitude: 0_i32,
28601        target_system: 0_u8,
28602        time_usec: 0_u64,
28603    };
28604    #[cfg(feature = "arbitrary")]
28605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28606        use arbitrary::{Arbitrary, Unstructured};
28607        let mut buf = [0u8; 1024];
28608        rng.fill_bytes(&mut buf);
28609        let mut unstructured = Unstructured::new(&buf);
28610        Self::arbitrary(&mut unstructured).unwrap_or_default()
28611    }
28612}
28613impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28614    fn default() -> Self {
28615        Self::DEFAULT.clone()
28616    }
28617}
28618impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28619    type Message = MavMessage;
28620    const ID: u32 = 48u32;
28621    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28622    const EXTRA_CRC: u8 = 41u8;
28623    const ENCODED_LEN: usize = 21usize;
28624    fn deser(
28625        _version: MavlinkVersion,
28626        __input: &[u8],
28627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28628        let avail_len = __input.len();
28629        let mut payload_buf = [0; Self::ENCODED_LEN];
28630        let mut buf = if avail_len < Self::ENCODED_LEN {
28631            payload_buf[0..avail_len].copy_from_slice(__input);
28632            Bytes::new(&payload_buf)
28633        } else {
28634            Bytes::new(__input)
28635        };
28636        let mut __struct = Self::default();
28637        __struct.latitude = buf.get_i32_le();
28638        __struct.longitude = buf.get_i32_le();
28639        __struct.altitude = buf.get_i32_le();
28640        __struct.target_system = buf.get_u8();
28641        __struct.time_usec = buf.get_u64_le();
28642        Ok(__struct)
28643    }
28644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28645        let mut __tmp = BytesMut::new(bytes);
28646        #[allow(clippy::absurd_extreme_comparisons)]
28647        #[allow(unused_comparisons)]
28648        if __tmp.remaining() < Self::ENCODED_LEN {
28649            panic!(
28650                "buffer is too small (need {} bytes, but got {})",
28651                Self::ENCODED_LEN,
28652                __tmp.remaining(),
28653            )
28654        }
28655        __tmp.put_i32_le(self.latitude);
28656        __tmp.put_i32_le(self.longitude);
28657        __tmp.put_i32_le(self.altitude);
28658        __tmp.put_u8(self.target_system);
28659        if matches!(version, MavlinkVersion::V2) {
28660            __tmp.put_u64_le(self.time_usec);
28661            let len = __tmp.len();
28662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28663        } else {
28664            __tmp.len()
28665        }
28666    }
28667}
28668#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28669#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28670#[doc = ""]
28671#[doc = "ID: 243"]
28672#[derive(Debug, Clone, PartialEq)]
28673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28675#[cfg_attr(feature = "ts", derive(TS))]
28676#[cfg_attr(feature = "ts", ts(export))]
28677pub struct SET_HOME_POSITION_DATA {
28678    #[doc = "Latitude (WGS84)"]
28679    pub latitude: i32,
28680    #[doc = "Longitude (WGS84)"]
28681    pub longitude: i32,
28682    #[doc = "Altitude (MSL). Positive for up."]
28683    pub altitude: i32,
28684    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28685    pub x: f32,
28686    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28687    pub y: f32,
28688    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28689    pub z: f32,
28690    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28691    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28692    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28693    pub q: [f32; 4],
28694    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28695    pub approach_x: f32,
28696    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28697    pub approach_y: f32,
28698    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28699    pub approach_z: f32,
28700    #[doc = "System ID."]
28701    pub target_system: u8,
28702    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28704    pub time_usec: u64,
28705}
28706impl SET_HOME_POSITION_DATA {
28707    pub const ENCODED_LEN: usize = 61usize;
28708    pub const DEFAULT: Self = Self {
28709        latitude: 0_i32,
28710        longitude: 0_i32,
28711        altitude: 0_i32,
28712        x: 0.0_f32,
28713        y: 0.0_f32,
28714        z: 0.0_f32,
28715        q: [0.0_f32; 4usize],
28716        approach_x: 0.0_f32,
28717        approach_y: 0.0_f32,
28718        approach_z: 0.0_f32,
28719        target_system: 0_u8,
28720        time_usec: 0_u64,
28721    };
28722    #[cfg(feature = "arbitrary")]
28723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28724        use arbitrary::{Arbitrary, Unstructured};
28725        let mut buf = [0u8; 1024];
28726        rng.fill_bytes(&mut buf);
28727        let mut unstructured = Unstructured::new(&buf);
28728        Self::arbitrary(&mut unstructured).unwrap_or_default()
28729    }
28730}
28731impl Default for SET_HOME_POSITION_DATA {
28732    fn default() -> Self {
28733        Self::DEFAULT.clone()
28734    }
28735}
28736impl MessageData for SET_HOME_POSITION_DATA {
28737    type Message = MavMessage;
28738    const ID: u32 = 243u32;
28739    const NAME: &'static str = "SET_HOME_POSITION";
28740    const EXTRA_CRC: u8 = 85u8;
28741    const ENCODED_LEN: usize = 61usize;
28742    fn deser(
28743        _version: MavlinkVersion,
28744        __input: &[u8],
28745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28746        let avail_len = __input.len();
28747        let mut payload_buf = [0; Self::ENCODED_LEN];
28748        let mut buf = if avail_len < Self::ENCODED_LEN {
28749            payload_buf[0..avail_len].copy_from_slice(__input);
28750            Bytes::new(&payload_buf)
28751        } else {
28752            Bytes::new(__input)
28753        };
28754        let mut __struct = Self::default();
28755        __struct.latitude = buf.get_i32_le();
28756        __struct.longitude = buf.get_i32_le();
28757        __struct.altitude = buf.get_i32_le();
28758        __struct.x = buf.get_f32_le();
28759        __struct.y = buf.get_f32_le();
28760        __struct.z = buf.get_f32_le();
28761        for v in &mut __struct.q {
28762            let val = buf.get_f32_le();
28763            *v = val;
28764        }
28765        __struct.approach_x = buf.get_f32_le();
28766        __struct.approach_y = buf.get_f32_le();
28767        __struct.approach_z = buf.get_f32_le();
28768        __struct.target_system = buf.get_u8();
28769        __struct.time_usec = buf.get_u64_le();
28770        Ok(__struct)
28771    }
28772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28773        let mut __tmp = BytesMut::new(bytes);
28774        #[allow(clippy::absurd_extreme_comparisons)]
28775        #[allow(unused_comparisons)]
28776        if __tmp.remaining() < Self::ENCODED_LEN {
28777            panic!(
28778                "buffer is too small (need {} bytes, but got {})",
28779                Self::ENCODED_LEN,
28780                __tmp.remaining(),
28781            )
28782        }
28783        __tmp.put_i32_le(self.latitude);
28784        __tmp.put_i32_le(self.longitude);
28785        __tmp.put_i32_le(self.altitude);
28786        __tmp.put_f32_le(self.x);
28787        __tmp.put_f32_le(self.y);
28788        __tmp.put_f32_le(self.z);
28789        for val in &self.q {
28790            __tmp.put_f32_le(*val);
28791        }
28792        __tmp.put_f32_le(self.approach_x);
28793        __tmp.put_f32_le(self.approach_y);
28794        __tmp.put_f32_le(self.approach_z);
28795        __tmp.put_u8(self.target_system);
28796        if matches!(version, MavlinkVersion::V2) {
28797            __tmp.put_u64_le(self.time_usec);
28798            let len = __tmp.len();
28799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28800        } else {
28801            __tmp.len()
28802        }
28803    }
28804}
28805#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28806#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28807#[doc = ""]
28808#[doc = "ID: 11"]
28809#[derive(Debug, Clone, PartialEq)]
28810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28812#[cfg_attr(feature = "ts", derive(TS))]
28813#[cfg_attr(feature = "ts", ts(export))]
28814pub struct SET_MODE_DATA {
28815    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28816    pub custom_mode: u32,
28817    #[doc = "The system setting the mode"]
28818    pub target_system: u8,
28819    #[doc = "The new base mode."]
28820    pub base_mode: MavMode,
28821}
28822impl SET_MODE_DATA {
28823    pub const ENCODED_LEN: usize = 6usize;
28824    pub const DEFAULT: Self = Self {
28825        custom_mode: 0_u32,
28826        target_system: 0_u8,
28827        base_mode: MavMode::DEFAULT,
28828    };
28829    #[cfg(feature = "arbitrary")]
28830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28831        use arbitrary::{Arbitrary, Unstructured};
28832        let mut buf = [0u8; 1024];
28833        rng.fill_bytes(&mut buf);
28834        let mut unstructured = Unstructured::new(&buf);
28835        Self::arbitrary(&mut unstructured).unwrap_or_default()
28836    }
28837}
28838impl Default for SET_MODE_DATA {
28839    fn default() -> Self {
28840        Self::DEFAULT.clone()
28841    }
28842}
28843impl MessageData for SET_MODE_DATA {
28844    type Message = MavMessage;
28845    const ID: u32 = 11u32;
28846    const NAME: &'static str = "SET_MODE";
28847    const EXTRA_CRC: u8 = 89u8;
28848    const ENCODED_LEN: usize = 6usize;
28849    fn deser(
28850        _version: MavlinkVersion,
28851        __input: &[u8],
28852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28853        let avail_len = __input.len();
28854        let mut payload_buf = [0; Self::ENCODED_LEN];
28855        let mut buf = if avail_len < Self::ENCODED_LEN {
28856            payload_buf[0..avail_len].copy_from_slice(__input);
28857            Bytes::new(&payload_buf)
28858        } else {
28859            Bytes::new(__input)
28860        };
28861        let mut __struct = Self::default();
28862        __struct.custom_mode = buf.get_u32_le();
28863        __struct.target_system = buf.get_u8();
28864        let tmp = buf.get_u8();
28865        __struct.base_mode =
28866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28867                enum_type: "MavMode",
28868                value: tmp as u64,
28869            })?;
28870        Ok(__struct)
28871    }
28872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28873        let mut __tmp = BytesMut::new(bytes);
28874        #[allow(clippy::absurd_extreme_comparisons)]
28875        #[allow(unused_comparisons)]
28876        if __tmp.remaining() < Self::ENCODED_LEN {
28877            panic!(
28878                "buffer is too small (need {} bytes, but got {})",
28879                Self::ENCODED_LEN,
28880                __tmp.remaining(),
28881            )
28882        }
28883        __tmp.put_u32_le(self.custom_mode);
28884        __tmp.put_u8(self.target_system);
28885        __tmp.put_u8(self.base_mode as u8);
28886        if matches!(version, MavlinkVersion::V2) {
28887            let len = __tmp.len();
28888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28889        } else {
28890            __tmp.len()
28891        }
28892    }
28893}
28894#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28895#[doc = ""]
28896#[doc = "ID: 86"]
28897#[derive(Debug, Clone, PartialEq)]
28898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28900#[cfg_attr(feature = "ts", derive(TS))]
28901#[cfg_attr(feature = "ts", ts(export))]
28902pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28903    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28904    pub time_boot_ms: u32,
28905    #[doc = "Latitude in WGS84 frame"]
28906    pub lat_int: i32,
28907    #[doc = "Longitude in WGS84 frame"]
28908    pub lon_int: i32,
28909    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28910    pub alt: f32,
28911    #[doc = "X velocity in NED frame"]
28912    pub vx: f32,
28913    #[doc = "Y velocity in NED frame"]
28914    pub vy: f32,
28915    #[doc = "Z velocity in NED frame"]
28916    pub vz: f32,
28917    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28918    pub afx: f32,
28919    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28920    pub afy: f32,
28921    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28922    pub afz: f32,
28923    #[doc = "yaw setpoint"]
28924    pub yaw: f32,
28925    #[doc = "yaw rate setpoint"]
28926    pub yaw_rate: f32,
28927    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28928    pub type_mask: PositionTargetTypemask,
28929    #[doc = "System ID"]
28930    pub target_system: u8,
28931    #[doc = "Component ID"]
28932    pub target_component: u8,
28933    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28934    pub coordinate_frame: MavFrame,
28935}
28936impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28937    pub const ENCODED_LEN: usize = 53usize;
28938    pub const DEFAULT: Self = Self {
28939        time_boot_ms: 0_u32,
28940        lat_int: 0_i32,
28941        lon_int: 0_i32,
28942        alt: 0.0_f32,
28943        vx: 0.0_f32,
28944        vy: 0.0_f32,
28945        vz: 0.0_f32,
28946        afx: 0.0_f32,
28947        afy: 0.0_f32,
28948        afz: 0.0_f32,
28949        yaw: 0.0_f32,
28950        yaw_rate: 0.0_f32,
28951        type_mask: PositionTargetTypemask::DEFAULT,
28952        target_system: 0_u8,
28953        target_component: 0_u8,
28954        coordinate_frame: MavFrame::DEFAULT,
28955    };
28956    #[cfg(feature = "arbitrary")]
28957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28958        use arbitrary::{Arbitrary, Unstructured};
28959        let mut buf = [0u8; 1024];
28960        rng.fill_bytes(&mut buf);
28961        let mut unstructured = Unstructured::new(&buf);
28962        Self::arbitrary(&mut unstructured).unwrap_or_default()
28963    }
28964}
28965impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28966    fn default() -> Self {
28967        Self::DEFAULT.clone()
28968    }
28969}
28970impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28971    type Message = MavMessage;
28972    const ID: u32 = 86u32;
28973    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28974    const EXTRA_CRC: u8 = 5u8;
28975    const ENCODED_LEN: usize = 53usize;
28976    fn deser(
28977        _version: MavlinkVersion,
28978        __input: &[u8],
28979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28980        let avail_len = __input.len();
28981        let mut payload_buf = [0; Self::ENCODED_LEN];
28982        let mut buf = if avail_len < Self::ENCODED_LEN {
28983            payload_buf[0..avail_len].copy_from_slice(__input);
28984            Bytes::new(&payload_buf)
28985        } else {
28986            Bytes::new(__input)
28987        };
28988        let mut __struct = Self::default();
28989        __struct.time_boot_ms = buf.get_u32_le();
28990        __struct.lat_int = buf.get_i32_le();
28991        __struct.lon_int = buf.get_i32_le();
28992        __struct.alt = buf.get_f32_le();
28993        __struct.vx = buf.get_f32_le();
28994        __struct.vy = buf.get_f32_le();
28995        __struct.vz = buf.get_f32_le();
28996        __struct.afx = buf.get_f32_le();
28997        __struct.afy = buf.get_f32_le();
28998        __struct.afz = buf.get_f32_le();
28999        __struct.yaw = buf.get_f32_le();
29000        __struct.yaw_rate = buf.get_f32_le();
29001        let tmp = buf.get_u16_le();
29002        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
29003            ::mavlink_core::error::ParserError::InvalidFlag {
29004                flag_type: "PositionTargetTypemask",
29005                value: tmp as u64,
29006            },
29007        )?;
29008        __struct.target_system = buf.get_u8();
29009        __struct.target_component = buf.get_u8();
29010        let tmp = buf.get_u8();
29011        __struct.coordinate_frame =
29012            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29013                enum_type: "MavFrame",
29014                value: tmp as u64,
29015            })?;
29016        Ok(__struct)
29017    }
29018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29019        let mut __tmp = BytesMut::new(bytes);
29020        #[allow(clippy::absurd_extreme_comparisons)]
29021        #[allow(unused_comparisons)]
29022        if __tmp.remaining() < Self::ENCODED_LEN {
29023            panic!(
29024                "buffer is too small (need {} bytes, but got {})",
29025                Self::ENCODED_LEN,
29026                __tmp.remaining(),
29027            )
29028        }
29029        __tmp.put_u32_le(self.time_boot_ms);
29030        __tmp.put_i32_le(self.lat_int);
29031        __tmp.put_i32_le(self.lon_int);
29032        __tmp.put_f32_le(self.alt);
29033        __tmp.put_f32_le(self.vx);
29034        __tmp.put_f32_le(self.vy);
29035        __tmp.put_f32_le(self.vz);
29036        __tmp.put_f32_le(self.afx);
29037        __tmp.put_f32_le(self.afy);
29038        __tmp.put_f32_le(self.afz);
29039        __tmp.put_f32_le(self.yaw);
29040        __tmp.put_f32_le(self.yaw_rate);
29041        __tmp.put_u16_le(self.type_mask.bits());
29042        __tmp.put_u8(self.target_system);
29043        __tmp.put_u8(self.target_component);
29044        __tmp.put_u8(self.coordinate_frame as u8);
29045        if matches!(version, MavlinkVersion::V2) {
29046            let len = __tmp.len();
29047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29048        } else {
29049            __tmp.len()
29050        }
29051    }
29052}
29053#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29054#[doc = ""]
29055#[doc = "ID: 84"]
29056#[derive(Debug, Clone, PartialEq)]
29057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29059#[cfg_attr(feature = "ts", derive(TS))]
29060#[cfg_attr(feature = "ts", ts(export))]
29061pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29062    #[doc = "Timestamp (time since system boot)."]
29063    pub time_boot_ms: u32,
29064    #[doc = "X Position in NED frame"]
29065    pub x: f32,
29066    #[doc = "Y Position in NED frame"]
29067    pub y: f32,
29068    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29069    pub z: f32,
29070    #[doc = "X velocity in NED frame"]
29071    pub vx: f32,
29072    #[doc = "Y velocity in NED frame"]
29073    pub vy: f32,
29074    #[doc = "Z velocity in NED frame"]
29075    pub vz: f32,
29076    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29077    pub afx: f32,
29078    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29079    pub afy: f32,
29080    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29081    pub afz: f32,
29082    #[doc = "yaw setpoint"]
29083    pub yaw: f32,
29084    #[doc = "yaw rate setpoint"]
29085    pub yaw_rate: f32,
29086    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29087    pub type_mask: PositionTargetTypemask,
29088    #[doc = "System ID"]
29089    pub target_system: u8,
29090    #[doc = "Component ID"]
29091    pub target_component: u8,
29092    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29093    pub coordinate_frame: MavFrame,
29094}
29095impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29096    pub const ENCODED_LEN: usize = 53usize;
29097    pub const DEFAULT: Self = Self {
29098        time_boot_ms: 0_u32,
29099        x: 0.0_f32,
29100        y: 0.0_f32,
29101        z: 0.0_f32,
29102        vx: 0.0_f32,
29103        vy: 0.0_f32,
29104        vz: 0.0_f32,
29105        afx: 0.0_f32,
29106        afy: 0.0_f32,
29107        afz: 0.0_f32,
29108        yaw: 0.0_f32,
29109        yaw_rate: 0.0_f32,
29110        type_mask: PositionTargetTypemask::DEFAULT,
29111        target_system: 0_u8,
29112        target_component: 0_u8,
29113        coordinate_frame: MavFrame::DEFAULT,
29114    };
29115    #[cfg(feature = "arbitrary")]
29116    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29117        use arbitrary::{Arbitrary, Unstructured};
29118        let mut buf = [0u8; 1024];
29119        rng.fill_bytes(&mut buf);
29120        let mut unstructured = Unstructured::new(&buf);
29121        Self::arbitrary(&mut unstructured).unwrap_or_default()
29122    }
29123}
29124impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29125    fn default() -> Self {
29126        Self::DEFAULT.clone()
29127    }
29128}
29129impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29130    type Message = MavMessage;
29131    const ID: u32 = 84u32;
29132    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29133    const EXTRA_CRC: u8 = 143u8;
29134    const ENCODED_LEN: usize = 53usize;
29135    fn deser(
29136        _version: MavlinkVersion,
29137        __input: &[u8],
29138    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29139        let avail_len = __input.len();
29140        let mut payload_buf = [0; Self::ENCODED_LEN];
29141        let mut buf = if avail_len < Self::ENCODED_LEN {
29142            payload_buf[0..avail_len].copy_from_slice(__input);
29143            Bytes::new(&payload_buf)
29144        } else {
29145            Bytes::new(__input)
29146        };
29147        let mut __struct = Self::default();
29148        __struct.time_boot_ms = buf.get_u32_le();
29149        __struct.x = buf.get_f32_le();
29150        __struct.y = buf.get_f32_le();
29151        __struct.z = buf.get_f32_le();
29152        __struct.vx = buf.get_f32_le();
29153        __struct.vy = buf.get_f32_le();
29154        __struct.vz = buf.get_f32_le();
29155        __struct.afx = buf.get_f32_le();
29156        __struct.afy = buf.get_f32_le();
29157        __struct.afz = buf.get_f32_le();
29158        __struct.yaw = buf.get_f32_le();
29159        __struct.yaw_rate = buf.get_f32_le();
29160        let tmp = buf.get_u16_le();
29161        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
29162            ::mavlink_core::error::ParserError::InvalidFlag {
29163                flag_type: "PositionTargetTypemask",
29164                value: tmp as u64,
29165            },
29166        )?;
29167        __struct.target_system = buf.get_u8();
29168        __struct.target_component = buf.get_u8();
29169        let tmp = buf.get_u8();
29170        __struct.coordinate_frame =
29171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29172                enum_type: "MavFrame",
29173                value: tmp as u64,
29174            })?;
29175        Ok(__struct)
29176    }
29177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29178        let mut __tmp = BytesMut::new(bytes);
29179        #[allow(clippy::absurd_extreme_comparisons)]
29180        #[allow(unused_comparisons)]
29181        if __tmp.remaining() < Self::ENCODED_LEN {
29182            panic!(
29183                "buffer is too small (need {} bytes, but got {})",
29184                Self::ENCODED_LEN,
29185                __tmp.remaining(),
29186            )
29187        }
29188        __tmp.put_u32_le(self.time_boot_ms);
29189        __tmp.put_f32_le(self.x);
29190        __tmp.put_f32_le(self.y);
29191        __tmp.put_f32_le(self.z);
29192        __tmp.put_f32_le(self.vx);
29193        __tmp.put_f32_le(self.vy);
29194        __tmp.put_f32_le(self.vz);
29195        __tmp.put_f32_le(self.afx);
29196        __tmp.put_f32_le(self.afy);
29197        __tmp.put_f32_le(self.afz);
29198        __tmp.put_f32_le(self.yaw);
29199        __tmp.put_f32_le(self.yaw_rate);
29200        __tmp.put_u16_le(self.type_mask.bits());
29201        __tmp.put_u8(self.target_system);
29202        __tmp.put_u8(self.target_component);
29203        __tmp.put_u8(self.coordinate_frame as u8);
29204        if matches!(version, MavlinkVersion::V2) {
29205            let len = __tmp.len();
29206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29207        } else {
29208            __tmp.len()
29209        }
29210    }
29211}
29212#[doc = "Status of simulation environment, if used."]
29213#[doc = ""]
29214#[doc = "ID: 108"]
29215#[derive(Debug, Clone, PartialEq)]
29216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29218#[cfg_attr(feature = "ts", derive(TS))]
29219#[cfg_attr(feature = "ts", ts(export))]
29220pub struct SIM_STATE_DATA {
29221    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29222    pub q1: f32,
29223    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29224    pub q2: f32,
29225    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29226    pub q3: f32,
29227    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29228    pub q4: f32,
29229    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29230    pub roll: f32,
29231    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29232    pub pitch: f32,
29233    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29234    pub yaw: f32,
29235    #[doc = "X acceleration"]
29236    pub xacc: f32,
29237    #[doc = "Y acceleration"]
29238    pub yacc: f32,
29239    #[doc = "Z acceleration"]
29240    pub zacc: f32,
29241    #[doc = "Angular speed around X axis"]
29242    pub xgyro: f32,
29243    #[doc = "Angular speed around Y axis"]
29244    pub ygyro: f32,
29245    #[doc = "Angular speed around Z axis"]
29246    pub zgyro: f32,
29247    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29248    pub lat: f32,
29249    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29250    pub lon: f32,
29251    #[doc = "Altitude"]
29252    pub alt: f32,
29253    #[doc = "Horizontal position standard deviation"]
29254    pub std_dev_horz: f32,
29255    #[doc = "Vertical position standard deviation"]
29256    pub std_dev_vert: f32,
29257    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29258    pub vn: f32,
29259    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29260    pub ve: f32,
29261    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29262    pub vd: f32,
29263    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29264    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29265    pub lat_int: i32,
29266    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29268    pub lon_int: i32,
29269}
29270impl SIM_STATE_DATA {
29271    pub const ENCODED_LEN: usize = 92usize;
29272    pub const DEFAULT: Self = Self {
29273        q1: 0.0_f32,
29274        q2: 0.0_f32,
29275        q3: 0.0_f32,
29276        q4: 0.0_f32,
29277        roll: 0.0_f32,
29278        pitch: 0.0_f32,
29279        yaw: 0.0_f32,
29280        xacc: 0.0_f32,
29281        yacc: 0.0_f32,
29282        zacc: 0.0_f32,
29283        xgyro: 0.0_f32,
29284        ygyro: 0.0_f32,
29285        zgyro: 0.0_f32,
29286        lat: 0.0_f32,
29287        lon: 0.0_f32,
29288        alt: 0.0_f32,
29289        std_dev_horz: 0.0_f32,
29290        std_dev_vert: 0.0_f32,
29291        vn: 0.0_f32,
29292        ve: 0.0_f32,
29293        vd: 0.0_f32,
29294        lat_int: 0_i32,
29295        lon_int: 0_i32,
29296    };
29297    #[cfg(feature = "arbitrary")]
29298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29299        use arbitrary::{Arbitrary, Unstructured};
29300        let mut buf = [0u8; 1024];
29301        rng.fill_bytes(&mut buf);
29302        let mut unstructured = Unstructured::new(&buf);
29303        Self::arbitrary(&mut unstructured).unwrap_or_default()
29304    }
29305}
29306impl Default for SIM_STATE_DATA {
29307    fn default() -> Self {
29308        Self::DEFAULT.clone()
29309    }
29310}
29311impl MessageData for SIM_STATE_DATA {
29312    type Message = MavMessage;
29313    const ID: u32 = 108u32;
29314    const NAME: &'static str = "SIM_STATE";
29315    const EXTRA_CRC: u8 = 32u8;
29316    const ENCODED_LEN: usize = 92usize;
29317    fn deser(
29318        _version: MavlinkVersion,
29319        __input: &[u8],
29320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29321        let avail_len = __input.len();
29322        let mut payload_buf = [0; Self::ENCODED_LEN];
29323        let mut buf = if avail_len < Self::ENCODED_LEN {
29324            payload_buf[0..avail_len].copy_from_slice(__input);
29325            Bytes::new(&payload_buf)
29326        } else {
29327            Bytes::new(__input)
29328        };
29329        let mut __struct = Self::default();
29330        __struct.q1 = buf.get_f32_le();
29331        __struct.q2 = buf.get_f32_le();
29332        __struct.q3 = buf.get_f32_le();
29333        __struct.q4 = buf.get_f32_le();
29334        __struct.roll = buf.get_f32_le();
29335        __struct.pitch = buf.get_f32_le();
29336        __struct.yaw = buf.get_f32_le();
29337        __struct.xacc = buf.get_f32_le();
29338        __struct.yacc = buf.get_f32_le();
29339        __struct.zacc = buf.get_f32_le();
29340        __struct.xgyro = buf.get_f32_le();
29341        __struct.ygyro = buf.get_f32_le();
29342        __struct.zgyro = buf.get_f32_le();
29343        __struct.lat = buf.get_f32_le();
29344        __struct.lon = buf.get_f32_le();
29345        __struct.alt = buf.get_f32_le();
29346        __struct.std_dev_horz = buf.get_f32_le();
29347        __struct.std_dev_vert = buf.get_f32_le();
29348        __struct.vn = buf.get_f32_le();
29349        __struct.ve = buf.get_f32_le();
29350        __struct.vd = buf.get_f32_le();
29351        __struct.lat_int = buf.get_i32_le();
29352        __struct.lon_int = buf.get_i32_le();
29353        Ok(__struct)
29354    }
29355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29356        let mut __tmp = BytesMut::new(bytes);
29357        #[allow(clippy::absurd_extreme_comparisons)]
29358        #[allow(unused_comparisons)]
29359        if __tmp.remaining() < Self::ENCODED_LEN {
29360            panic!(
29361                "buffer is too small (need {} bytes, but got {})",
29362                Self::ENCODED_LEN,
29363                __tmp.remaining(),
29364            )
29365        }
29366        __tmp.put_f32_le(self.q1);
29367        __tmp.put_f32_le(self.q2);
29368        __tmp.put_f32_le(self.q3);
29369        __tmp.put_f32_le(self.q4);
29370        __tmp.put_f32_le(self.roll);
29371        __tmp.put_f32_le(self.pitch);
29372        __tmp.put_f32_le(self.yaw);
29373        __tmp.put_f32_le(self.xacc);
29374        __tmp.put_f32_le(self.yacc);
29375        __tmp.put_f32_le(self.zacc);
29376        __tmp.put_f32_le(self.xgyro);
29377        __tmp.put_f32_le(self.ygyro);
29378        __tmp.put_f32_le(self.zgyro);
29379        __tmp.put_f32_le(self.lat);
29380        __tmp.put_f32_le(self.lon);
29381        __tmp.put_f32_le(self.alt);
29382        __tmp.put_f32_le(self.std_dev_horz);
29383        __tmp.put_f32_le(self.std_dev_vert);
29384        __tmp.put_f32_le(self.vn);
29385        __tmp.put_f32_le(self.ve);
29386        __tmp.put_f32_le(self.vd);
29387        if matches!(version, MavlinkVersion::V2) {
29388            __tmp.put_i32_le(self.lat_int);
29389            __tmp.put_i32_le(self.lon_int);
29390            let len = __tmp.len();
29391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29392        } else {
29393            __tmp.len()
29394        }
29395    }
29396}
29397#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29398#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29399#[doc = ""]
29400#[doc = "ID: 370"]
29401#[derive(Debug, Clone, PartialEq)]
29402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29404#[cfg_attr(feature = "ts", derive(TS))]
29405#[cfg_attr(feature = "ts", ts(export))]
29406pub struct SMART_BATTERY_INFO_DATA {
29407    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29408    pub capacity_full_specification: i32,
29409    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29410    pub capacity_full: i32,
29411    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29412    pub cycle_count: u16,
29413    #[doc = "Battery weight. 0: field not provided."]
29414    pub weight: u16,
29415    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29416    pub discharge_minimum_voltage: u16,
29417    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29418    pub charging_minimum_voltage: u16,
29419    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29420    pub resting_minimum_voltage: u16,
29421    #[doc = "Battery ID"]
29422    pub id: u8,
29423    #[doc = "Function of the battery"]
29424    pub battery_function: MavBatteryFunction,
29425    #[doc = "Type (chemistry) of the battery"]
29426    pub mavtype: MavBatteryType,
29427    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29428    #[cfg_attr(feature = "ts", ts(type = "string"))]
29429    pub serial_number: CharArray<16>,
29430    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29431    #[cfg_attr(feature = "ts", ts(type = "string"))]
29432    pub device_name: CharArray<50>,
29433    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29435    pub charging_maximum_voltage: u16,
29436    #[doc = "Number of battery cells in series. 0: field not provided."]
29437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29438    pub cells_in_series: u8,
29439    #[doc = "Maximum pack discharge current. 0: field not provided."]
29440    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29441    pub discharge_maximum_current: u32,
29442    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29444    pub discharge_maximum_burst_current: u32,
29445    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29447    #[cfg_attr(feature = "ts", ts(type = "string"))]
29448    pub manufacture_date: CharArray<11>,
29449}
29450impl SMART_BATTERY_INFO_DATA {
29451    pub const ENCODED_LEN: usize = 109usize;
29452    pub const DEFAULT: Self = Self {
29453        capacity_full_specification: 0_i32,
29454        capacity_full: 0_i32,
29455        cycle_count: 0_u16,
29456        weight: 0_u16,
29457        discharge_minimum_voltage: 0_u16,
29458        charging_minimum_voltage: 0_u16,
29459        resting_minimum_voltage: 0_u16,
29460        id: 0_u8,
29461        battery_function: MavBatteryFunction::DEFAULT,
29462        mavtype: MavBatteryType::DEFAULT,
29463        serial_number: CharArray::new([0_u8; 16usize]),
29464        device_name: CharArray::new([0_u8; 50usize]),
29465        charging_maximum_voltage: 0_u16,
29466        cells_in_series: 0_u8,
29467        discharge_maximum_current: 0_u32,
29468        discharge_maximum_burst_current: 0_u32,
29469        manufacture_date: CharArray::new([0_u8; 11usize]),
29470    };
29471    #[cfg(feature = "arbitrary")]
29472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29473        use arbitrary::{Arbitrary, Unstructured};
29474        let mut buf = [0u8; 1024];
29475        rng.fill_bytes(&mut buf);
29476        let mut unstructured = Unstructured::new(&buf);
29477        Self::arbitrary(&mut unstructured).unwrap_or_default()
29478    }
29479}
29480impl Default for SMART_BATTERY_INFO_DATA {
29481    fn default() -> Self {
29482        Self::DEFAULT.clone()
29483    }
29484}
29485impl MessageData for SMART_BATTERY_INFO_DATA {
29486    type Message = MavMessage;
29487    const ID: u32 = 370u32;
29488    const NAME: &'static str = "SMART_BATTERY_INFO";
29489    const EXTRA_CRC: u8 = 75u8;
29490    const ENCODED_LEN: usize = 109usize;
29491    fn deser(
29492        _version: MavlinkVersion,
29493        __input: &[u8],
29494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29495        let avail_len = __input.len();
29496        let mut payload_buf = [0; Self::ENCODED_LEN];
29497        let mut buf = if avail_len < Self::ENCODED_LEN {
29498            payload_buf[0..avail_len].copy_from_slice(__input);
29499            Bytes::new(&payload_buf)
29500        } else {
29501            Bytes::new(__input)
29502        };
29503        let mut __struct = Self::default();
29504        __struct.capacity_full_specification = buf.get_i32_le();
29505        __struct.capacity_full = buf.get_i32_le();
29506        __struct.cycle_count = buf.get_u16_le();
29507        __struct.weight = buf.get_u16_le();
29508        __struct.discharge_minimum_voltage = buf.get_u16_le();
29509        __struct.charging_minimum_voltage = buf.get_u16_le();
29510        __struct.resting_minimum_voltage = buf.get_u16_le();
29511        __struct.id = buf.get_u8();
29512        let tmp = buf.get_u8();
29513        __struct.battery_function =
29514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29515                enum_type: "MavBatteryFunction",
29516                value: tmp as u64,
29517            })?;
29518        let tmp = buf.get_u8();
29519        __struct.mavtype =
29520            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29521                enum_type: "MavBatteryType",
29522                value: tmp as u64,
29523            })?;
29524        let mut tmp = [0_u8; 16usize];
29525        for v in &mut tmp {
29526            *v = buf.get_u8();
29527        }
29528        __struct.serial_number = CharArray::new(tmp);
29529        let mut tmp = [0_u8; 50usize];
29530        for v in &mut tmp {
29531            *v = buf.get_u8();
29532        }
29533        __struct.device_name = CharArray::new(tmp);
29534        __struct.charging_maximum_voltage = buf.get_u16_le();
29535        __struct.cells_in_series = buf.get_u8();
29536        __struct.discharge_maximum_current = buf.get_u32_le();
29537        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29538        let mut tmp = [0_u8; 11usize];
29539        for v in &mut tmp {
29540            *v = buf.get_u8();
29541        }
29542        __struct.manufacture_date = CharArray::new(tmp);
29543        Ok(__struct)
29544    }
29545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29546        let mut __tmp = BytesMut::new(bytes);
29547        #[allow(clippy::absurd_extreme_comparisons)]
29548        #[allow(unused_comparisons)]
29549        if __tmp.remaining() < Self::ENCODED_LEN {
29550            panic!(
29551                "buffer is too small (need {} bytes, but got {})",
29552                Self::ENCODED_LEN,
29553                __tmp.remaining(),
29554            )
29555        }
29556        __tmp.put_i32_le(self.capacity_full_specification);
29557        __tmp.put_i32_le(self.capacity_full);
29558        __tmp.put_u16_le(self.cycle_count);
29559        __tmp.put_u16_le(self.weight);
29560        __tmp.put_u16_le(self.discharge_minimum_voltage);
29561        __tmp.put_u16_le(self.charging_minimum_voltage);
29562        __tmp.put_u16_le(self.resting_minimum_voltage);
29563        __tmp.put_u8(self.id);
29564        __tmp.put_u8(self.battery_function as u8);
29565        __tmp.put_u8(self.mavtype as u8);
29566        for val in &self.serial_number {
29567            __tmp.put_u8(*val);
29568        }
29569        for val in &self.device_name {
29570            __tmp.put_u8(*val);
29571        }
29572        if matches!(version, MavlinkVersion::V2) {
29573            __tmp.put_u16_le(self.charging_maximum_voltage);
29574            __tmp.put_u8(self.cells_in_series);
29575            __tmp.put_u32_le(self.discharge_maximum_current);
29576            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29577            for val in &self.manufacture_date {
29578                __tmp.put_u8(*val);
29579            }
29580            let len = __tmp.len();
29581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29582        } else {
29583            __tmp.len()
29584        }
29585    }
29586}
29587#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29588#[doc = ""]
29589#[doc = "ID: 253"]
29590#[derive(Debug, Clone, PartialEq)]
29591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29593#[cfg_attr(feature = "ts", derive(TS))]
29594#[cfg_attr(feature = "ts", ts(export))]
29595pub struct STATUSTEXT_DATA {
29596    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29597    pub severity: MavSeverity,
29598    #[doc = "Status text message, without null termination character"]
29599    #[cfg_attr(feature = "ts", ts(type = "string"))]
29600    pub text: CharArray<50>,
29601    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29603    pub id: u16,
29604    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29606    pub chunk_seq: u8,
29607}
29608impl STATUSTEXT_DATA {
29609    pub const ENCODED_LEN: usize = 54usize;
29610    pub const DEFAULT: Self = Self {
29611        severity: MavSeverity::DEFAULT,
29612        text: CharArray::new([0_u8; 50usize]),
29613        id: 0_u16,
29614        chunk_seq: 0_u8,
29615    };
29616    #[cfg(feature = "arbitrary")]
29617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29618        use arbitrary::{Arbitrary, Unstructured};
29619        let mut buf = [0u8; 1024];
29620        rng.fill_bytes(&mut buf);
29621        let mut unstructured = Unstructured::new(&buf);
29622        Self::arbitrary(&mut unstructured).unwrap_or_default()
29623    }
29624}
29625impl Default for STATUSTEXT_DATA {
29626    fn default() -> Self {
29627        Self::DEFAULT.clone()
29628    }
29629}
29630impl MessageData for STATUSTEXT_DATA {
29631    type Message = MavMessage;
29632    const ID: u32 = 253u32;
29633    const NAME: &'static str = "STATUSTEXT";
29634    const EXTRA_CRC: u8 = 83u8;
29635    const ENCODED_LEN: usize = 54usize;
29636    fn deser(
29637        _version: MavlinkVersion,
29638        __input: &[u8],
29639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29640        let avail_len = __input.len();
29641        let mut payload_buf = [0; Self::ENCODED_LEN];
29642        let mut buf = if avail_len < Self::ENCODED_LEN {
29643            payload_buf[0..avail_len].copy_from_slice(__input);
29644            Bytes::new(&payload_buf)
29645        } else {
29646            Bytes::new(__input)
29647        };
29648        let mut __struct = Self::default();
29649        let tmp = buf.get_u8();
29650        __struct.severity =
29651            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29652                enum_type: "MavSeverity",
29653                value: tmp as u64,
29654            })?;
29655        let mut tmp = [0_u8; 50usize];
29656        for v in &mut tmp {
29657            *v = buf.get_u8();
29658        }
29659        __struct.text = CharArray::new(tmp);
29660        __struct.id = buf.get_u16_le();
29661        __struct.chunk_seq = buf.get_u8();
29662        Ok(__struct)
29663    }
29664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29665        let mut __tmp = BytesMut::new(bytes);
29666        #[allow(clippy::absurd_extreme_comparisons)]
29667        #[allow(unused_comparisons)]
29668        if __tmp.remaining() < Self::ENCODED_LEN {
29669            panic!(
29670                "buffer is too small (need {} bytes, but got {})",
29671                Self::ENCODED_LEN,
29672                __tmp.remaining(),
29673            )
29674        }
29675        __tmp.put_u8(self.severity as u8);
29676        for val in &self.text {
29677            __tmp.put_u8(*val);
29678        }
29679        if matches!(version, MavlinkVersion::V2) {
29680            __tmp.put_u16_le(self.id);
29681            __tmp.put_u8(self.chunk_seq);
29682            let len = __tmp.len();
29683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29684        } else {
29685            __tmp.len()
29686        }
29687    }
29688}
29689#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29690#[doc = ""]
29691#[doc = "ID: 261"]
29692#[derive(Debug, Clone, PartialEq)]
29693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29695#[cfg_attr(feature = "ts", derive(TS))]
29696#[cfg_attr(feature = "ts", ts(export))]
29697pub struct STORAGE_INFORMATION_DATA {
29698    #[doc = "Timestamp (time since system boot)."]
29699    pub time_boot_ms: u32,
29700    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29701    pub total_capacity: f32,
29702    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29703    pub used_capacity: f32,
29704    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29705    pub available_capacity: f32,
29706    #[doc = "Read speed."]
29707    pub read_speed: f32,
29708    #[doc = "Write speed."]
29709    pub write_speed: f32,
29710    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29711    pub storage_id: u8,
29712    #[doc = "Number of storage devices"]
29713    pub storage_count: u8,
29714    #[doc = "Status of storage"]
29715    pub status: StorageStatus,
29716    #[doc = "Type of storage"]
29717    #[cfg_attr(feature = "serde", serde(default))]
29718    pub mavtype: StorageType,
29719    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29721    #[cfg_attr(feature = "ts", ts(type = "string"))]
29722    pub name: CharArray<32>,
29723    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29724    #[cfg_attr(feature = "serde", serde(default))]
29725    pub storage_usage: StorageUsageFlag,
29726}
29727impl STORAGE_INFORMATION_DATA {
29728    pub const ENCODED_LEN: usize = 61usize;
29729    pub const DEFAULT: Self = Self {
29730        time_boot_ms: 0_u32,
29731        total_capacity: 0.0_f32,
29732        used_capacity: 0.0_f32,
29733        available_capacity: 0.0_f32,
29734        read_speed: 0.0_f32,
29735        write_speed: 0.0_f32,
29736        storage_id: 0_u8,
29737        storage_count: 0_u8,
29738        status: StorageStatus::DEFAULT,
29739        mavtype: StorageType::DEFAULT,
29740        name: CharArray::new([0_u8; 32usize]),
29741        storage_usage: StorageUsageFlag::DEFAULT,
29742    };
29743    #[cfg(feature = "arbitrary")]
29744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29745        use arbitrary::{Arbitrary, Unstructured};
29746        let mut buf = [0u8; 1024];
29747        rng.fill_bytes(&mut buf);
29748        let mut unstructured = Unstructured::new(&buf);
29749        Self::arbitrary(&mut unstructured).unwrap_or_default()
29750    }
29751}
29752impl Default for STORAGE_INFORMATION_DATA {
29753    fn default() -> Self {
29754        Self::DEFAULT.clone()
29755    }
29756}
29757impl MessageData for STORAGE_INFORMATION_DATA {
29758    type Message = MavMessage;
29759    const ID: u32 = 261u32;
29760    const NAME: &'static str = "STORAGE_INFORMATION";
29761    const EXTRA_CRC: u8 = 179u8;
29762    const ENCODED_LEN: usize = 61usize;
29763    fn deser(
29764        _version: MavlinkVersion,
29765        __input: &[u8],
29766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29767        let avail_len = __input.len();
29768        let mut payload_buf = [0; Self::ENCODED_LEN];
29769        let mut buf = if avail_len < Self::ENCODED_LEN {
29770            payload_buf[0..avail_len].copy_from_slice(__input);
29771            Bytes::new(&payload_buf)
29772        } else {
29773            Bytes::new(__input)
29774        };
29775        let mut __struct = Self::default();
29776        __struct.time_boot_ms = buf.get_u32_le();
29777        __struct.total_capacity = buf.get_f32_le();
29778        __struct.used_capacity = buf.get_f32_le();
29779        __struct.available_capacity = buf.get_f32_le();
29780        __struct.read_speed = buf.get_f32_le();
29781        __struct.write_speed = buf.get_f32_le();
29782        __struct.storage_id = buf.get_u8();
29783        __struct.storage_count = buf.get_u8();
29784        let tmp = buf.get_u8();
29785        __struct.status =
29786            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29787                enum_type: "StorageStatus",
29788                value: tmp as u64,
29789            })?;
29790        let tmp = buf.get_u8();
29791        __struct.mavtype =
29792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29793                enum_type: "StorageType",
29794                value: tmp as u64,
29795            })?;
29796        let mut tmp = [0_u8; 32usize];
29797        for v in &mut tmp {
29798            *v = buf.get_u8();
29799        }
29800        __struct.name = CharArray::new(tmp);
29801        let tmp = buf.get_u8();
29802        __struct.storage_usage = StorageUsageFlag::from_bits(tmp).ok_or(
29803            ::mavlink_core::error::ParserError::InvalidFlag {
29804                flag_type: "StorageUsageFlag",
29805                value: tmp as u64,
29806            },
29807        )?;
29808        Ok(__struct)
29809    }
29810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29811        let mut __tmp = BytesMut::new(bytes);
29812        #[allow(clippy::absurd_extreme_comparisons)]
29813        #[allow(unused_comparisons)]
29814        if __tmp.remaining() < Self::ENCODED_LEN {
29815            panic!(
29816                "buffer is too small (need {} bytes, but got {})",
29817                Self::ENCODED_LEN,
29818                __tmp.remaining(),
29819            )
29820        }
29821        __tmp.put_u32_le(self.time_boot_ms);
29822        __tmp.put_f32_le(self.total_capacity);
29823        __tmp.put_f32_le(self.used_capacity);
29824        __tmp.put_f32_le(self.available_capacity);
29825        __tmp.put_f32_le(self.read_speed);
29826        __tmp.put_f32_le(self.write_speed);
29827        __tmp.put_u8(self.storage_id);
29828        __tmp.put_u8(self.storage_count);
29829        __tmp.put_u8(self.status as u8);
29830        if matches!(version, MavlinkVersion::V2) {
29831            __tmp.put_u8(self.mavtype as u8);
29832            for val in &self.name {
29833                __tmp.put_u8(*val);
29834            }
29835            __tmp.put_u8(self.storage_usage.bits());
29836            let len = __tmp.len();
29837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29838        } else {
29839            __tmp.len()
29840        }
29841    }
29842}
29843#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29844#[doc = ""]
29845#[doc = "ID: 401"]
29846#[derive(Debug, Clone, PartialEq)]
29847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29849#[cfg_attr(feature = "ts", derive(TS))]
29850#[cfg_attr(feature = "ts", ts(export))]
29851pub struct SUPPORTED_TUNES_DATA {
29852    #[doc = "Bitfield of supported tune formats."]
29853    pub format: TuneFormat,
29854    #[doc = "System ID"]
29855    pub target_system: u8,
29856    #[doc = "Component ID"]
29857    pub target_component: u8,
29858}
29859impl SUPPORTED_TUNES_DATA {
29860    pub const ENCODED_LEN: usize = 6usize;
29861    pub const DEFAULT: Self = Self {
29862        format: TuneFormat::DEFAULT,
29863        target_system: 0_u8,
29864        target_component: 0_u8,
29865    };
29866    #[cfg(feature = "arbitrary")]
29867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29868        use arbitrary::{Arbitrary, Unstructured};
29869        let mut buf = [0u8; 1024];
29870        rng.fill_bytes(&mut buf);
29871        let mut unstructured = Unstructured::new(&buf);
29872        Self::arbitrary(&mut unstructured).unwrap_or_default()
29873    }
29874}
29875impl Default for SUPPORTED_TUNES_DATA {
29876    fn default() -> Self {
29877        Self::DEFAULT.clone()
29878    }
29879}
29880impl MessageData for SUPPORTED_TUNES_DATA {
29881    type Message = MavMessage;
29882    const ID: u32 = 401u32;
29883    const NAME: &'static str = "SUPPORTED_TUNES";
29884    const EXTRA_CRC: u8 = 183u8;
29885    const ENCODED_LEN: usize = 6usize;
29886    fn deser(
29887        _version: MavlinkVersion,
29888        __input: &[u8],
29889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29890        let avail_len = __input.len();
29891        let mut payload_buf = [0; Self::ENCODED_LEN];
29892        let mut buf = if avail_len < Self::ENCODED_LEN {
29893            payload_buf[0..avail_len].copy_from_slice(__input);
29894            Bytes::new(&payload_buf)
29895        } else {
29896            Bytes::new(__input)
29897        };
29898        let mut __struct = Self::default();
29899        let tmp = buf.get_u32_le();
29900        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29901            ::mavlink_core::error::ParserError::InvalidEnum {
29902                enum_type: "TuneFormat",
29903                value: tmp as u64,
29904            },
29905        )?;
29906        __struct.target_system = buf.get_u8();
29907        __struct.target_component = buf.get_u8();
29908        Ok(__struct)
29909    }
29910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29911        let mut __tmp = BytesMut::new(bytes);
29912        #[allow(clippy::absurd_extreme_comparisons)]
29913        #[allow(unused_comparisons)]
29914        if __tmp.remaining() < Self::ENCODED_LEN {
29915            panic!(
29916                "buffer is too small (need {} bytes, but got {})",
29917                Self::ENCODED_LEN,
29918                __tmp.remaining(),
29919            )
29920        }
29921        __tmp.put_u32_le(self.format as u32);
29922        __tmp.put_u8(self.target_system);
29923        __tmp.put_u8(self.target_component);
29924        if matches!(version, MavlinkVersion::V2) {
29925            let len = __tmp.len();
29926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29927        } else {
29928            __tmp.len()
29929        }
29930    }
29931}
29932#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29933#[doc = ""]
29934#[doc = "ID: 2"]
29935#[derive(Debug, Clone, PartialEq)]
29936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29938#[cfg_attr(feature = "ts", derive(TS))]
29939#[cfg_attr(feature = "ts", ts(export))]
29940pub struct SYSTEM_TIME_DATA {
29941    #[doc = "Timestamp (UNIX epoch time)."]
29942    pub time_unix_usec: u64,
29943    #[doc = "Timestamp (time since system boot)."]
29944    pub time_boot_ms: u32,
29945}
29946impl SYSTEM_TIME_DATA {
29947    pub const ENCODED_LEN: usize = 12usize;
29948    pub const DEFAULT: Self = Self {
29949        time_unix_usec: 0_u64,
29950        time_boot_ms: 0_u32,
29951    };
29952    #[cfg(feature = "arbitrary")]
29953    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29954        use arbitrary::{Arbitrary, Unstructured};
29955        let mut buf = [0u8; 1024];
29956        rng.fill_bytes(&mut buf);
29957        let mut unstructured = Unstructured::new(&buf);
29958        Self::arbitrary(&mut unstructured).unwrap_or_default()
29959    }
29960}
29961impl Default for SYSTEM_TIME_DATA {
29962    fn default() -> Self {
29963        Self::DEFAULT.clone()
29964    }
29965}
29966impl MessageData for SYSTEM_TIME_DATA {
29967    type Message = MavMessage;
29968    const ID: u32 = 2u32;
29969    const NAME: &'static str = "SYSTEM_TIME";
29970    const EXTRA_CRC: u8 = 137u8;
29971    const ENCODED_LEN: usize = 12usize;
29972    fn deser(
29973        _version: MavlinkVersion,
29974        __input: &[u8],
29975    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29976        let avail_len = __input.len();
29977        let mut payload_buf = [0; Self::ENCODED_LEN];
29978        let mut buf = if avail_len < Self::ENCODED_LEN {
29979            payload_buf[0..avail_len].copy_from_slice(__input);
29980            Bytes::new(&payload_buf)
29981        } else {
29982            Bytes::new(__input)
29983        };
29984        let mut __struct = Self::default();
29985        __struct.time_unix_usec = buf.get_u64_le();
29986        __struct.time_boot_ms = buf.get_u32_le();
29987        Ok(__struct)
29988    }
29989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29990        let mut __tmp = BytesMut::new(bytes);
29991        #[allow(clippy::absurd_extreme_comparisons)]
29992        #[allow(unused_comparisons)]
29993        if __tmp.remaining() < Self::ENCODED_LEN {
29994            panic!(
29995                "buffer is too small (need {} bytes, but got {})",
29996                Self::ENCODED_LEN,
29997                __tmp.remaining(),
29998            )
29999        }
30000        __tmp.put_u64_le(self.time_unix_usec);
30001        __tmp.put_u32_le(self.time_boot_ms);
30002        if matches!(version, MavlinkVersion::V2) {
30003            let len = __tmp.len();
30004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30005        } else {
30006            __tmp.len()
30007        }
30008    }
30009}
30010#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30011#[doc = ""]
30012#[doc = "ID: 1"]
30013#[derive(Debug, Clone, PartialEq)]
30014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30016#[cfg_attr(feature = "ts", derive(TS))]
30017#[cfg_attr(feature = "ts", ts(export))]
30018pub struct SYS_STATUS_DATA {
30019    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30020    pub onboard_control_sensors_present: MavSysStatusSensor,
30021    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30022    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30023    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30024    pub onboard_control_sensors_health: MavSysStatusSensor,
30025    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30026    pub load: u16,
30027    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30028    pub voltage_battery: u16,
30029    #[doc = "Battery current, -1: Current not sent by autopilot"]
30030    pub current_battery: i16,
30031    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30032    pub drop_rate_comm: u16,
30033    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30034    pub errors_comm: u16,
30035    #[doc = "Autopilot-specific errors"]
30036    pub errors_count1: u16,
30037    #[doc = "Autopilot-specific errors"]
30038    pub errors_count2: u16,
30039    #[doc = "Autopilot-specific errors"]
30040    pub errors_count3: u16,
30041    #[doc = "Autopilot-specific errors"]
30042    pub errors_count4: u16,
30043    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30044    pub battery_remaining: i8,
30045    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30046    #[cfg_attr(feature = "serde", serde(default))]
30047    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30048    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30049    #[cfg_attr(feature = "serde", serde(default))]
30050    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30051    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30052    #[cfg_attr(feature = "serde", serde(default))]
30053    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30054}
30055impl SYS_STATUS_DATA {
30056    pub const ENCODED_LEN: usize = 43usize;
30057    pub const DEFAULT: Self = Self {
30058        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30059        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30060        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30061        load: 0_u16,
30062        voltage_battery: 0_u16,
30063        current_battery: 0_i16,
30064        drop_rate_comm: 0_u16,
30065        errors_comm: 0_u16,
30066        errors_count1: 0_u16,
30067        errors_count2: 0_u16,
30068        errors_count3: 0_u16,
30069        errors_count4: 0_u16,
30070        battery_remaining: 0_i8,
30071        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30072        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30073        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30074    };
30075    #[cfg(feature = "arbitrary")]
30076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30077        use arbitrary::{Arbitrary, Unstructured};
30078        let mut buf = [0u8; 1024];
30079        rng.fill_bytes(&mut buf);
30080        let mut unstructured = Unstructured::new(&buf);
30081        Self::arbitrary(&mut unstructured).unwrap_or_default()
30082    }
30083}
30084impl Default for SYS_STATUS_DATA {
30085    fn default() -> Self {
30086        Self::DEFAULT.clone()
30087    }
30088}
30089impl MessageData for SYS_STATUS_DATA {
30090    type Message = MavMessage;
30091    const ID: u32 = 1u32;
30092    const NAME: &'static str = "SYS_STATUS";
30093    const EXTRA_CRC: u8 = 124u8;
30094    const ENCODED_LEN: usize = 43usize;
30095    fn deser(
30096        _version: MavlinkVersion,
30097        __input: &[u8],
30098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30099        let avail_len = __input.len();
30100        let mut payload_buf = [0; Self::ENCODED_LEN];
30101        let mut buf = if avail_len < Self::ENCODED_LEN {
30102            payload_buf[0..avail_len].copy_from_slice(__input);
30103            Bytes::new(&payload_buf)
30104        } else {
30105            Bytes::new(__input)
30106        };
30107        let mut __struct = Self::default();
30108        let tmp = buf.get_u32_le();
30109        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(tmp).ok_or(
30110            ::mavlink_core::error::ParserError::InvalidFlag {
30111                flag_type: "MavSysStatusSensor",
30112                value: tmp as u64,
30113            },
30114        )?;
30115        let tmp = buf.get_u32_le();
30116        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(tmp).ok_or(
30117            ::mavlink_core::error::ParserError::InvalidFlag {
30118                flag_type: "MavSysStatusSensor",
30119                value: tmp as u64,
30120            },
30121        )?;
30122        let tmp = buf.get_u32_le();
30123        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(tmp).ok_or(
30124            ::mavlink_core::error::ParserError::InvalidFlag {
30125                flag_type: "MavSysStatusSensor",
30126                value: tmp as u64,
30127            },
30128        )?;
30129        __struct.load = buf.get_u16_le();
30130        __struct.voltage_battery = buf.get_u16_le();
30131        __struct.current_battery = buf.get_i16_le();
30132        __struct.drop_rate_comm = buf.get_u16_le();
30133        __struct.errors_comm = buf.get_u16_le();
30134        __struct.errors_count1 = buf.get_u16_le();
30135        __struct.errors_count2 = buf.get_u16_le();
30136        __struct.errors_count3 = buf.get_u16_le();
30137        __struct.errors_count4 = buf.get_u16_le();
30138        __struct.battery_remaining = buf.get_i8();
30139        let tmp = buf.get_u32_le();
30140        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
30141            tmp,
30142        )
30143        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30144            flag_type: "MavSysStatusSensorExtended",
30145            value: tmp as u64,
30146        })?;
30147        let tmp = buf.get_u32_le();
30148        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
30149            tmp,
30150        )
30151        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30152            flag_type: "MavSysStatusSensorExtended",
30153            value: tmp as u64,
30154        })?;
30155        let tmp = buf.get_u32_le();
30156        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
30157            tmp,
30158        )
30159        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30160            flag_type: "MavSysStatusSensorExtended",
30161            value: tmp as u64,
30162        })?;
30163        Ok(__struct)
30164    }
30165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30166        let mut __tmp = BytesMut::new(bytes);
30167        #[allow(clippy::absurd_extreme_comparisons)]
30168        #[allow(unused_comparisons)]
30169        if __tmp.remaining() < Self::ENCODED_LEN {
30170            panic!(
30171                "buffer is too small (need {} bytes, but got {})",
30172                Self::ENCODED_LEN,
30173                __tmp.remaining(),
30174            )
30175        }
30176        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30177        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30178        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30179        __tmp.put_u16_le(self.load);
30180        __tmp.put_u16_le(self.voltage_battery);
30181        __tmp.put_i16_le(self.current_battery);
30182        __tmp.put_u16_le(self.drop_rate_comm);
30183        __tmp.put_u16_le(self.errors_comm);
30184        __tmp.put_u16_le(self.errors_count1);
30185        __tmp.put_u16_le(self.errors_count2);
30186        __tmp.put_u16_le(self.errors_count3);
30187        __tmp.put_u16_le(self.errors_count4);
30188        __tmp.put_i8(self.battery_remaining);
30189        if matches!(version, MavlinkVersion::V2) {
30190            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30191            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30192            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30193            let len = __tmp.len();
30194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30195        } else {
30196            __tmp.len()
30197        }
30198    }
30199}
30200#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30201#[doc = ""]
30202#[doc = "ID: 135"]
30203#[derive(Debug, Clone, PartialEq)]
30204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30206#[cfg_attr(feature = "ts", derive(TS))]
30207#[cfg_attr(feature = "ts", ts(export))]
30208pub struct TERRAIN_CHECK_DATA {
30209    #[doc = "Latitude"]
30210    pub lat: i32,
30211    #[doc = "Longitude"]
30212    pub lon: i32,
30213}
30214impl TERRAIN_CHECK_DATA {
30215    pub const ENCODED_LEN: usize = 8usize;
30216    pub const DEFAULT: Self = Self {
30217        lat: 0_i32,
30218        lon: 0_i32,
30219    };
30220    #[cfg(feature = "arbitrary")]
30221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30222        use arbitrary::{Arbitrary, Unstructured};
30223        let mut buf = [0u8; 1024];
30224        rng.fill_bytes(&mut buf);
30225        let mut unstructured = Unstructured::new(&buf);
30226        Self::arbitrary(&mut unstructured).unwrap_or_default()
30227    }
30228}
30229impl Default for TERRAIN_CHECK_DATA {
30230    fn default() -> Self {
30231        Self::DEFAULT.clone()
30232    }
30233}
30234impl MessageData for TERRAIN_CHECK_DATA {
30235    type Message = MavMessage;
30236    const ID: u32 = 135u32;
30237    const NAME: &'static str = "TERRAIN_CHECK";
30238    const EXTRA_CRC: u8 = 203u8;
30239    const ENCODED_LEN: usize = 8usize;
30240    fn deser(
30241        _version: MavlinkVersion,
30242        __input: &[u8],
30243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30244        let avail_len = __input.len();
30245        let mut payload_buf = [0; Self::ENCODED_LEN];
30246        let mut buf = if avail_len < Self::ENCODED_LEN {
30247            payload_buf[0..avail_len].copy_from_slice(__input);
30248            Bytes::new(&payload_buf)
30249        } else {
30250            Bytes::new(__input)
30251        };
30252        let mut __struct = Self::default();
30253        __struct.lat = buf.get_i32_le();
30254        __struct.lon = buf.get_i32_le();
30255        Ok(__struct)
30256    }
30257    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30258        let mut __tmp = BytesMut::new(bytes);
30259        #[allow(clippy::absurd_extreme_comparisons)]
30260        #[allow(unused_comparisons)]
30261        if __tmp.remaining() < Self::ENCODED_LEN {
30262            panic!(
30263                "buffer is too small (need {} bytes, but got {})",
30264                Self::ENCODED_LEN,
30265                __tmp.remaining(),
30266            )
30267        }
30268        __tmp.put_i32_le(self.lat);
30269        __tmp.put_i32_le(self.lon);
30270        if matches!(version, MavlinkVersion::V2) {
30271            let len = __tmp.len();
30272            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30273        } else {
30274            __tmp.len()
30275        }
30276    }
30277}
30278#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30279#[doc = ""]
30280#[doc = "ID: 134"]
30281#[derive(Debug, Clone, PartialEq)]
30282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30284#[cfg_attr(feature = "ts", derive(TS))]
30285#[cfg_attr(feature = "ts", ts(export))]
30286pub struct TERRAIN_DATA_DATA {
30287    #[doc = "Latitude of SW corner of first grid"]
30288    pub lat: i32,
30289    #[doc = "Longitude of SW corner of first grid"]
30290    pub lon: i32,
30291    #[doc = "Grid spacing"]
30292    pub grid_spacing: u16,
30293    #[doc = "Terrain data MSL"]
30294    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30295    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30296    pub data: [i16; 16],
30297    #[doc = "bit within the terrain request mask"]
30298    pub gridbit: u8,
30299}
30300impl TERRAIN_DATA_DATA {
30301    pub const ENCODED_LEN: usize = 43usize;
30302    pub const DEFAULT: Self = Self {
30303        lat: 0_i32,
30304        lon: 0_i32,
30305        grid_spacing: 0_u16,
30306        data: [0_i16; 16usize],
30307        gridbit: 0_u8,
30308    };
30309    #[cfg(feature = "arbitrary")]
30310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30311        use arbitrary::{Arbitrary, Unstructured};
30312        let mut buf = [0u8; 1024];
30313        rng.fill_bytes(&mut buf);
30314        let mut unstructured = Unstructured::new(&buf);
30315        Self::arbitrary(&mut unstructured).unwrap_or_default()
30316    }
30317}
30318impl Default for TERRAIN_DATA_DATA {
30319    fn default() -> Self {
30320        Self::DEFAULT.clone()
30321    }
30322}
30323impl MessageData for TERRAIN_DATA_DATA {
30324    type Message = MavMessage;
30325    const ID: u32 = 134u32;
30326    const NAME: &'static str = "TERRAIN_DATA";
30327    const EXTRA_CRC: u8 = 229u8;
30328    const ENCODED_LEN: usize = 43usize;
30329    fn deser(
30330        _version: MavlinkVersion,
30331        __input: &[u8],
30332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30333        let avail_len = __input.len();
30334        let mut payload_buf = [0; Self::ENCODED_LEN];
30335        let mut buf = if avail_len < Self::ENCODED_LEN {
30336            payload_buf[0..avail_len].copy_from_slice(__input);
30337            Bytes::new(&payload_buf)
30338        } else {
30339            Bytes::new(__input)
30340        };
30341        let mut __struct = Self::default();
30342        __struct.lat = buf.get_i32_le();
30343        __struct.lon = buf.get_i32_le();
30344        __struct.grid_spacing = buf.get_u16_le();
30345        for v in &mut __struct.data {
30346            let val = buf.get_i16_le();
30347            *v = val;
30348        }
30349        __struct.gridbit = buf.get_u8();
30350        Ok(__struct)
30351    }
30352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30353        let mut __tmp = BytesMut::new(bytes);
30354        #[allow(clippy::absurd_extreme_comparisons)]
30355        #[allow(unused_comparisons)]
30356        if __tmp.remaining() < Self::ENCODED_LEN {
30357            panic!(
30358                "buffer is too small (need {} bytes, but got {})",
30359                Self::ENCODED_LEN,
30360                __tmp.remaining(),
30361            )
30362        }
30363        __tmp.put_i32_le(self.lat);
30364        __tmp.put_i32_le(self.lon);
30365        __tmp.put_u16_le(self.grid_spacing);
30366        for val in &self.data {
30367            __tmp.put_i16_le(*val);
30368        }
30369        __tmp.put_u8(self.gridbit);
30370        if matches!(version, MavlinkVersion::V2) {
30371            let len = __tmp.len();
30372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30373        } else {
30374            __tmp.len()
30375        }
30376    }
30377}
30378#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30379#[doc = ""]
30380#[doc = "ID: 136"]
30381#[derive(Debug, Clone, PartialEq)]
30382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30384#[cfg_attr(feature = "ts", derive(TS))]
30385#[cfg_attr(feature = "ts", ts(export))]
30386pub struct TERRAIN_REPORT_DATA {
30387    #[doc = "Latitude"]
30388    pub lat: i32,
30389    #[doc = "Longitude"]
30390    pub lon: i32,
30391    #[doc = "Terrain height MSL"]
30392    pub terrain_height: f32,
30393    #[doc = "Current vehicle height above lat/lon terrain height"]
30394    pub current_height: f32,
30395    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30396    pub spacing: u16,
30397    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30398    pub pending: u16,
30399    #[doc = "Number of 4x4 terrain blocks in memory"]
30400    pub loaded: u16,
30401}
30402impl TERRAIN_REPORT_DATA {
30403    pub const ENCODED_LEN: usize = 22usize;
30404    pub const DEFAULT: Self = Self {
30405        lat: 0_i32,
30406        lon: 0_i32,
30407        terrain_height: 0.0_f32,
30408        current_height: 0.0_f32,
30409        spacing: 0_u16,
30410        pending: 0_u16,
30411        loaded: 0_u16,
30412    };
30413    #[cfg(feature = "arbitrary")]
30414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30415        use arbitrary::{Arbitrary, Unstructured};
30416        let mut buf = [0u8; 1024];
30417        rng.fill_bytes(&mut buf);
30418        let mut unstructured = Unstructured::new(&buf);
30419        Self::arbitrary(&mut unstructured).unwrap_or_default()
30420    }
30421}
30422impl Default for TERRAIN_REPORT_DATA {
30423    fn default() -> Self {
30424        Self::DEFAULT.clone()
30425    }
30426}
30427impl MessageData for TERRAIN_REPORT_DATA {
30428    type Message = MavMessage;
30429    const ID: u32 = 136u32;
30430    const NAME: &'static str = "TERRAIN_REPORT";
30431    const EXTRA_CRC: u8 = 1u8;
30432    const ENCODED_LEN: usize = 22usize;
30433    fn deser(
30434        _version: MavlinkVersion,
30435        __input: &[u8],
30436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30437        let avail_len = __input.len();
30438        let mut payload_buf = [0; Self::ENCODED_LEN];
30439        let mut buf = if avail_len < Self::ENCODED_LEN {
30440            payload_buf[0..avail_len].copy_from_slice(__input);
30441            Bytes::new(&payload_buf)
30442        } else {
30443            Bytes::new(__input)
30444        };
30445        let mut __struct = Self::default();
30446        __struct.lat = buf.get_i32_le();
30447        __struct.lon = buf.get_i32_le();
30448        __struct.terrain_height = buf.get_f32_le();
30449        __struct.current_height = buf.get_f32_le();
30450        __struct.spacing = buf.get_u16_le();
30451        __struct.pending = buf.get_u16_le();
30452        __struct.loaded = buf.get_u16_le();
30453        Ok(__struct)
30454    }
30455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30456        let mut __tmp = BytesMut::new(bytes);
30457        #[allow(clippy::absurd_extreme_comparisons)]
30458        #[allow(unused_comparisons)]
30459        if __tmp.remaining() < Self::ENCODED_LEN {
30460            panic!(
30461                "buffer is too small (need {} bytes, but got {})",
30462                Self::ENCODED_LEN,
30463                __tmp.remaining(),
30464            )
30465        }
30466        __tmp.put_i32_le(self.lat);
30467        __tmp.put_i32_le(self.lon);
30468        __tmp.put_f32_le(self.terrain_height);
30469        __tmp.put_f32_le(self.current_height);
30470        __tmp.put_u16_le(self.spacing);
30471        __tmp.put_u16_le(self.pending);
30472        __tmp.put_u16_le(self.loaded);
30473        if matches!(version, MavlinkVersion::V2) {
30474            let len = __tmp.len();
30475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30476        } else {
30477            __tmp.len()
30478        }
30479    }
30480}
30481#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30482#[doc = ""]
30483#[doc = "ID: 133"]
30484#[derive(Debug, Clone, PartialEq)]
30485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30487#[cfg_attr(feature = "ts", derive(TS))]
30488#[cfg_attr(feature = "ts", ts(export))]
30489pub struct TERRAIN_REQUEST_DATA {
30490    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30491    pub mask: u64,
30492    #[doc = "Latitude of SW corner of first grid"]
30493    pub lat: i32,
30494    #[doc = "Longitude of SW corner of first grid"]
30495    pub lon: i32,
30496    #[doc = "Grid spacing"]
30497    pub grid_spacing: u16,
30498}
30499impl TERRAIN_REQUEST_DATA {
30500    pub const ENCODED_LEN: usize = 18usize;
30501    pub const DEFAULT: Self = Self {
30502        mask: 0_u64,
30503        lat: 0_i32,
30504        lon: 0_i32,
30505        grid_spacing: 0_u16,
30506    };
30507    #[cfg(feature = "arbitrary")]
30508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30509        use arbitrary::{Arbitrary, Unstructured};
30510        let mut buf = [0u8; 1024];
30511        rng.fill_bytes(&mut buf);
30512        let mut unstructured = Unstructured::new(&buf);
30513        Self::arbitrary(&mut unstructured).unwrap_or_default()
30514    }
30515}
30516impl Default for TERRAIN_REQUEST_DATA {
30517    fn default() -> Self {
30518        Self::DEFAULT.clone()
30519    }
30520}
30521impl MessageData for TERRAIN_REQUEST_DATA {
30522    type Message = MavMessage;
30523    const ID: u32 = 133u32;
30524    const NAME: &'static str = "TERRAIN_REQUEST";
30525    const EXTRA_CRC: u8 = 6u8;
30526    const ENCODED_LEN: usize = 18usize;
30527    fn deser(
30528        _version: MavlinkVersion,
30529        __input: &[u8],
30530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30531        let avail_len = __input.len();
30532        let mut payload_buf = [0; Self::ENCODED_LEN];
30533        let mut buf = if avail_len < Self::ENCODED_LEN {
30534            payload_buf[0..avail_len].copy_from_slice(__input);
30535            Bytes::new(&payload_buf)
30536        } else {
30537            Bytes::new(__input)
30538        };
30539        let mut __struct = Self::default();
30540        __struct.mask = buf.get_u64_le();
30541        __struct.lat = buf.get_i32_le();
30542        __struct.lon = buf.get_i32_le();
30543        __struct.grid_spacing = buf.get_u16_le();
30544        Ok(__struct)
30545    }
30546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30547        let mut __tmp = BytesMut::new(bytes);
30548        #[allow(clippy::absurd_extreme_comparisons)]
30549        #[allow(unused_comparisons)]
30550        if __tmp.remaining() < Self::ENCODED_LEN {
30551            panic!(
30552                "buffer is too small (need {} bytes, but got {})",
30553                Self::ENCODED_LEN,
30554                __tmp.remaining(),
30555            )
30556        }
30557        __tmp.put_u64_le(self.mask);
30558        __tmp.put_i32_le(self.lat);
30559        __tmp.put_i32_le(self.lon);
30560        __tmp.put_u16_le(self.grid_spacing);
30561        if matches!(version, MavlinkVersion::V2) {
30562            let len = __tmp.len();
30563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30564        } else {
30565            __tmp.len()
30566        }
30567    }
30568}
30569#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30570#[doc = ""]
30571#[doc = "ID: 111"]
30572#[derive(Debug, Clone, PartialEq)]
30573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30575#[cfg_attr(feature = "ts", derive(TS))]
30576#[cfg_attr(feature = "ts", ts(export))]
30577pub struct TIMESYNC_DATA {
30578    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30579    pub tc1: i64,
30580    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30581    pub ts1: i64,
30582    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30584    pub target_system: u8,
30585    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30586    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30587    pub target_component: u8,
30588}
30589impl TIMESYNC_DATA {
30590    pub const ENCODED_LEN: usize = 18usize;
30591    pub const DEFAULT: Self = Self {
30592        tc1: 0_i64,
30593        ts1: 0_i64,
30594        target_system: 0_u8,
30595        target_component: 0_u8,
30596    };
30597    #[cfg(feature = "arbitrary")]
30598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30599        use arbitrary::{Arbitrary, Unstructured};
30600        let mut buf = [0u8; 1024];
30601        rng.fill_bytes(&mut buf);
30602        let mut unstructured = Unstructured::new(&buf);
30603        Self::arbitrary(&mut unstructured).unwrap_or_default()
30604    }
30605}
30606impl Default for TIMESYNC_DATA {
30607    fn default() -> Self {
30608        Self::DEFAULT.clone()
30609    }
30610}
30611impl MessageData for TIMESYNC_DATA {
30612    type Message = MavMessage;
30613    const ID: u32 = 111u32;
30614    const NAME: &'static str = "TIMESYNC";
30615    const EXTRA_CRC: u8 = 34u8;
30616    const ENCODED_LEN: usize = 18usize;
30617    fn deser(
30618        _version: MavlinkVersion,
30619        __input: &[u8],
30620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30621        let avail_len = __input.len();
30622        let mut payload_buf = [0; Self::ENCODED_LEN];
30623        let mut buf = if avail_len < Self::ENCODED_LEN {
30624            payload_buf[0..avail_len].copy_from_slice(__input);
30625            Bytes::new(&payload_buf)
30626        } else {
30627            Bytes::new(__input)
30628        };
30629        let mut __struct = Self::default();
30630        __struct.tc1 = buf.get_i64_le();
30631        __struct.ts1 = buf.get_i64_le();
30632        __struct.target_system = buf.get_u8();
30633        __struct.target_component = buf.get_u8();
30634        Ok(__struct)
30635    }
30636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30637        let mut __tmp = BytesMut::new(bytes);
30638        #[allow(clippy::absurd_extreme_comparisons)]
30639        #[allow(unused_comparisons)]
30640        if __tmp.remaining() < Self::ENCODED_LEN {
30641            panic!(
30642                "buffer is too small (need {} bytes, but got {})",
30643                Self::ENCODED_LEN,
30644                __tmp.remaining(),
30645            )
30646        }
30647        __tmp.put_i64_le(self.tc1);
30648        __tmp.put_i64_le(self.ts1);
30649        if matches!(version, MavlinkVersion::V2) {
30650            __tmp.put_u8(self.target_system);
30651            __tmp.put_u8(self.target_component);
30652            let len = __tmp.len();
30653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30654        } else {
30655            __tmp.len()
30656        }
30657    }
30658}
30659#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30660#[doc = ""]
30661#[doc = "ID: 380"]
30662#[derive(Debug, Clone, PartialEq)]
30663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30665#[cfg_attr(feature = "ts", derive(TS))]
30666#[cfg_attr(feature = "ts", ts(export))]
30667pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30668    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30669    pub safe_return: i32,
30670    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30671    pub land: i32,
30672    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30673    pub mission_next_item: i32,
30674    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30675    pub mission_end: i32,
30676    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30677    pub commanded_action: i32,
30678}
30679impl TIME_ESTIMATE_TO_TARGET_DATA {
30680    pub const ENCODED_LEN: usize = 20usize;
30681    pub const DEFAULT: Self = Self {
30682        safe_return: 0_i32,
30683        land: 0_i32,
30684        mission_next_item: 0_i32,
30685        mission_end: 0_i32,
30686        commanded_action: 0_i32,
30687    };
30688    #[cfg(feature = "arbitrary")]
30689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30690        use arbitrary::{Arbitrary, Unstructured};
30691        let mut buf = [0u8; 1024];
30692        rng.fill_bytes(&mut buf);
30693        let mut unstructured = Unstructured::new(&buf);
30694        Self::arbitrary(&mut unstructured).unwrap_or_default()
30695    }
30696}
30697impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30698    fn default() -> Self {
30699        Self::DEFAULT.clone()
30700    }
30701}
30702impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30703    type Message = MavMessage;
30704    const ID: u32 = 380u32;
30705    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30706    const EXTRA_CRC: u8 = 232u8;
30707    const ENCODED_LEN: usize = 20usize;
30708    fn deser(
30709        _version: MavlinkVersion,
30710        __input: &[u8],
30711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30712        let avail_len = __input.len();
30713        let mut payload_buf = [0; Self::ENCODED_LEN];
30714        let mut buf = if avail_len < Self::ENCODED_LEN {
30715            payload_buf[0..avail_len].copy_from_slice(__input);
30716            Bytes::new(&payload_buf)
30717        } else {
30718            Bytes::new(__input)
30719        };
30720        let mut __struct = Self::default();
30721        __struct.safe_return = buf.get_i32_le();
30722        __struct.land = buf.get_i32_le();
30723        __struct.mission_next_item = buf.get_i32_le();
30724        __struct.mission_end = buf.get_i32_le();
30725        __struct.commanded_action = buf.get_i32_le();
30726        Ok(__struct)
30727    }
30728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30729        let mut __tmp = BytesMut::new(bytes);
30730        #[allow(clippy::absurd_extreme_comparisons)]
30731        #[allow(unused_comparisons)]
30732        if __tmp.remaining() < Self::ENCODED_LEN {
30733            panic!(
30734                "buffer is too small (need {} bytes, but got {})",
30735                Self::ENCODED_LEN,
30736                __tmp.remaining(),
30737            )
30738        }
30739        __tmp.put_i32_le(self.safe_return);
30740        __tmp.put_i32_le(self.land);
30741        __tmp.put_i32_le(self.mission_next_item);
30742        __tmp.put_i32_le(self.mission_end);
30743        __tmp.put_i32_le(self.commanded_action);
30744        if matches!(version, MavlinkVersion::V2) {
30745            let len = __tmp.len();
30746            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30747        } else {
30748            __tmp.len()
30749        }
30750    }
30751}
30752#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30753#[doc = ""]
30754#[doc = "ID: 333"]
30755#[derive(Debug, Clone, PartialEq)]
30756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30758#[cfg_attr(feature = "ts", derive(TS))]
30759#[cfg_attr(feature = "ts", ts(export))]
30760pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30761    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30762    pub time_usec: u64,
30763    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30764    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30765    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30766    pub pos_x: [f32; 5],
30767    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30770    pub pos_y: [f32; 5],
30771    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30772    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30773    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30774    pub pos_z: [f32; 5],
30775    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30776    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30777    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30778    pub delta: [f32; 5],
30779    #[doc = "Yaw. Set to NaN for unchanged"]
30780    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30781    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30782    pub pos_yaw: [f32; 5],
30783    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30784    pub valid_points: u8,
30785}
30786impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30787    pub const ENCODED_LEN: usize = 109usize;
30788    pub const DEFAULT: Self = Self {
30789        time_usec: 0_u64,
30790        pos_x: [0.0_f32; 5usize],
30791        pos_y: [0.0_f32; 5usize],
30792        pos_z: [0.0_f32; 5usize],
30793        delta: [0.0_f32; 5usize],
30794        pos_yaw: [0.0_f32; 5usize],
30795        valid_points: 0_u8,
30796    };
30797    #[cfg(feature = "arbitrary")]
30798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30799        use arbitrary::{Arbitrary, Unstructured};
30800        let mut buf = [0u8; 1024];
30801        rng.fill_bytes(&mut buf);
30802        let mut unstructured = Unstructured::new(&buf);
30803        Self::arbitrary(&mut unstructured).unwrap_or_default()
30804    }
30805}
30806impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30807    fn default() -> Self {
30808        Self::DEFAULT.clone()
30809    }
30810}
30811impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30812    type Message = MavMessage;
30813    const ID: u32 = 333u32;
30814    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30815    const EXTRA_CRC: u8 = 231u8;
30816    const ENCODED_LEN: usize = 109usize;
30817    fn deser(
30818        _version: MavlinkVersion,
30819        __input: &[u8],
30820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30821        let avail_len = __input.len();
30822        let mut payload_buf = [0; Self::ENCODED_LEN];
30823        let mut buf = if avail_len < Self::ENCODED_LEN {
30824            payload_buf[0..avail_len].copy_from_slice(__input);
30825            Bytes::new(&payload_buf)
30826        } else {
30827            Bytes::new(__input)
30828        };
30829        let mut __struct = Self::default();
30830        __struct.time_usec = buf.get_u64_le();
30831        for v in &mut __struct.pos_x {
30832            let val = buf.get_f32_le();
30833            *v = val;
30834        }
30835        for v in &mut __struct.pos_y {
30836            let val = buf.get_f32_le();
30837            *v = val;
30838        }
30839        for v in &mut __struct.pos_z {
30840            let val = buf.get_f32_le();
30841            *v = val;
30842        }
30843        for v in &mut __struct.delta {
30844            let val = buf.get_f32_le();
30845            *v = val;
30846        }
30847        for v in &mut __struct.pos_yaw {
30848            let val = buf.get_f32_le();
30849            *v = val;
30850        }
30851        __struct.valid_points = buf.get_u8();
30852        Ok(__struct)
30853    }
30854    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30855        let mut __tmp = BytesMut::new(bytes);
30856        #[allow(clippy::absurd_extreme_comparisons)]
30857        #[allow(unused_comparisons)]
30858        if __tmp.remaining() < Self::ENCODED_LEN {
30859            panic!(
30860                "buffer is too small (need {} bytes, but got {})",
30861                Self::ENCODED_LEN,
30862                __tmp.remaining(),
30863            )
30864        }
30865        __tmp.put_u64_le(self.time_usec);
30866        for val in &self.pos_x {
30867            __tmp.put_f32_le(*val);
30868        }
30869        for val in &self.pos_y {
30870            __tmp.put_f32_le(*val);
30871        }
30872        for val in &self.pos_z {
30873            __tmp.put_f32_le(*val);
30874        }
30875        for val in &self.delta {
30876            __tmp.put_f32_le(*val);
30877        }
30878        for val in &self.pos_yaw {
30879            __tmp.put_f32_le(*val);
30880        }
30881        __tmp.put_u8(self.valid_points);
30882        if matches!(version, MavlinkVersion::V2) {
30883            let len = __tmp.len();
30884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30885        } else {
30886            __tmp.len()
30887        }
30888    }
30889}
30890#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30891#[doc = ""]
30892#[doc = "ID: 332"]
30893#[derive(Debug, Clone, PartialEq)]
30894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30896#[cfg_attr(feature = "ts", derive(TS))]
30897#[cfg_attr(feature = "ts", ts(export))]
30898pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30899    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30900    pub time_usec: u64,
30901    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30903    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30904    pub pos_x: [f32; 5],
30905    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30907    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30908    pub pos_y: [f32; 5],
30909    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30911    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30912    pub pos_z: [f32; 5],
30913    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30915    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30916    pub vel_x: [f32; 5],
30917    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30919    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30920    pub vel_y: [f32; 5],
30921    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30923    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30924    pub vel_z: [f32; 5],
30925    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30926    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30927    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30928    pub acc_x: [f32; 5],
30929    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30930    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30931    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30932    pub acc_y: [f32; 5],
30933    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30934    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30935    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30936    pub acc_z: [f32; 5],
30937    #[doc = "Yaw angle, set to NaN if not being used"]
30938    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30939    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30940    pub pos_yaw: [f32; 5],
30941    #[doc = "Yaw rate, set to NaN if not being used"]
30942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30943    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30944    pub vel_yaw: [f32; 5],
30945    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30946    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30947    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30948    pub command: [u16; 5],
30949    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30950    pub valid_points: u8,
30951}
30952impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30953    pub const ENCODED_LEN: usize = 239usize;
30954    pub const DEFAULT: Self = Self {
30955        time_usec: 0_u64,
30956        pos_x: [0.0_f32; 5usize],
30957        pos_y: [0.0_f32; 5usize],
30958        pos_z: [0.0_f32; 5usize],
30959        vel_x: [0.0_f32; 5usize],
30960        vel_y: [0.0_f32; 5usize],
30961        vel_z: [0.0_f32; 5usize],
30962        acc_x: [0.0_f32; 5usize],
30963        acc_y: [0.0_f32; 5usize],
30964        acc_z: [0.0_f32; 5usize],
30965        pos_yaw: [0.0_f32; 5usize],
30966        vel_yaw: [0.0_f32; 5usize],
30967        command: [0_u16; 5usize],
30968        valid_points: 0_u8,
30969    };
30970    #[cfg(feature = "arbitrary")]
30971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30972        use arbitrary::{Arbitrary, Unstructured};
30973        let mut buf = [0u8; 1024];
30974        rng.fill_bytes(&mut buf);
30975        let mut unstructured = Unstructured::new(&buf);
30976        Self::arbitrary(&mut unstructured).unwrap_or_default()
30977    }
30978}
30979impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30980    fn default() -> Self {
30981        Self::DEFAULT.clone()
30982    }
30983}
30984impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30985    type Message = MavMessage;
30986    const ID: u32 = 332u32;
30987    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30988    const EXTRA_CRC: u8 = 236u8;
30989    const ENCODED_LEN: usize = 239usize;
30990    fn deser(
30991        _version: MavlinkVersion,
30992        __input: &[u8],
30993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30994        let avail_len = __input.len();
30995        let mut payload_buf = [0; Self::ENCODED_LEN];
30996        let mut buf = if avail_len < Self::ENCODED_LEN {
30997            payload_buf[0..avail_len].copy_from_slice(__input);
30998            Bytes::new(&payload_buf)
30999        } else {
31000            Bytes::new(__input)
31001        };
31002        let mut __struct = Self::default();
31003        __struct.time_usec = buf.get_u64_le();
31004        for v in &mut __struct.pos_x {
31005            let val = buf.get_f32_le();
31006            *v = val;
31007        }
31008        for v in &mut __struct.pos_y {
31009            let val = buf.get_f32_le();
31010            *v = val;
31011        }
31012        for v in &mut __struct.pos_z {
31013            let val = buf.get_f32_le();
31014            *v = val;
31015        }
31016        for v in &mut __struct.vel_x {
31017            let val = buf.get_f32_le();
31018            *v = val;
31019        }
31020        for v in &mut __struct.vel_y {
31021            let val = buf.get_f32_le();
31022            *v = val;
31023        }
31024        for v in &mut __struct.vel_z {
31025            let val = buf.get_f32_le();
31026            *v = val;
31027        }
31028        for v in &mut __struct.acc_x {
31029            let val = buf.get_f32_le();
31030            *v = val;
31031        }
31032        for v in &mut __struct.acc_y {
31033            let val = buf.get_f32_le();
31034            *v = val;
31035        }
31036        for v in &mut __struct.acc_z {
31037            let val = buf.get_f32_le();
31038            *v = val;
31039        }
31040        for v in &mut __struct.pos_yaw {
31041            let val = buf.get_f32_le();
31042            *v = val;
31043        }
31044        for v in &mut __struct.vel_yaw {
31045            let val = buf.get_f32_le();
31046            *v = val;
31047        }
31048        for v in &mut __struct.command {
31049            let val = buf.get_u16_le();
31050            *v = val;
31051        }
31052        __struct.valid_points = buf.get_u8();
31053        Ok(__struct)
31054    }
31055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31056        let mut __tmp = BytesMut::new(bytes);
31057        #[allow(clippy::absurd_extreme_comparisons)]
31058        #[allow(unused_comparisons)]
31059        if __tmp.remaining() < Self::ENCODED_LEN {
31060            panic!(
31061                "buffer is too small (need {} bytes, but got {})",
31062                Self::ENCODED_LEN,
31063                __tmp.remaining(),
31064            )
31065        }
31066        __tmp.put_u64_le(self.time_usec);
31067        for val in &self.pos_x {
31068            __tmp.put_f32_le(*val);
31069        }
31070        for val in &self.pos_y {
31071            __tmp.put_f32_le(*val);
31072        }
31073        for val in &self.pos_z {
31074            __tmp.put_f32_le(*val);
31075        }
31076        for val in &self.vel_x {
31077            __tmp.put_f32_le(*val);
31078        }
31079        for val in &self.vel_y {
31080            __tmp.put_f32_le(*val);
31081        }
31082        for val in &self.vel_z {
31083            __tmp.put_f32_le(*val);
31084        }
31085        for val in &self.acc_x {
31086            __tmp.put_f32_le(*val);
31087        }
31088        for val in &self.acc_y {
31089            __tmp.put_f32_le(*val);
31090        }
31091        for val in &self.acc_z {
31092            __tmp.put_f32_le(*val);
31093        }
31094        for val in &self.pos_yaw {
31095            __tmp.put_f32_le(*val);
31096        }
31097        for val in &self.vel_yaw {
31098            __tmp.put_f32_le(*val);
31099        }
31100        for val in &self.command {
31101            __tmp.put_u16_le(*val);
31102        }
31103        __tmp.put_u8(self.valid_points);
31104        if matches!(version, MavlinkVersion::V2) {
31105            let len = __tmp.len();
31106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31107        } else {
31108            __tmp.len()
31109        }
31110    }
31111}
31112#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31113#[doc = ""]
31114#[doc = "ID: 385"]
31115#[derive(Debug, Clone, PartialEq)]
31116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31118#[cfg_attr(feature = "ts", derive(TS))]
31119#[cfg_attr(feature = "ts", ts(export))]
31120pub struct TUNNEL_DATA {
31121    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31122    pub payload_type: MavTunnelPayloadType,
31123    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31124    pub target_system: u8,
31125    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
31126    pub target_component: u8,
31127    #[doc = "Length of the data transported in payload"]
31128    pub payload_length: u8,
31129    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
31130    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31131    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31132    pub payload: [u8; 128],
31133}
31134impl TUNNEL_DATA {
31135    pub const ENCODED_LEN: usize = 133usize;
31136    pub const DEFAULT: Self = Self {
31137        payload_type: MavTunnelPayloadType::DEFAULT,
31138        target_system: 0_u8,
31139        target_component: 0_u8,
31140        payload_length: 0_u8,
31141        payload: [0_u8; 128usize],
31142    };
31143    #[cfg(feature = "arbitrary")]
31144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31145        use arbitrary::{Arbitrary, Unstructured};
31146        let mut buf = [0u8; 1024];
31147        rng.fill_bytes(&mut buf);
31148        let mut unstructured = Unstructured::new(&buf);
31149        Self::arbitrary(&mut unstructured).unwrap_or_default()
31150    }
31151}
31152impl Default for TUNNEL_DATA {
31153    fn default() -> Self {
31154        Self::DEFAULT.clone()
31155    }
31156}
31157impl MessageData for TUNNEL_DATA {
31158    type Message = MavMessage;
31159    const ID: u32 = 385u32;
31160    const NAME: &'static str = "TUNNEL";
31161    const EXTRA_CRC: u8 = 147u8;
31162    const ENCODED_LEN: usize = 133usize;
31163    fn deser(
31164        _version: MavlinkVersion,
31165        __input: &[u8],
31166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31167        let avail_len = __input.len();
31168        let mut payload_buf = [0; Self::ENCODED_LEN];
31169        let mut buf = if avail_len < Self::ENCODED_LEN {
31170            payload_buf[0..avail_len].copy_from_slice(__input);
31171            Bytes::new(&payload_buf)
31172        } else {
31173            Bytes::new(__input)
31174        };
31175        let mut __struct = Self::default();
31176        let tmp = buf.get_u16_le();
31177        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31178            ::mavlink_core::error::ParserError::InvalidEnum {
31179                enum_type: "MavTunnelPayloadType",
31180                value: tmp as u64,
31181            },
31182        )?;
31183        __struct.target_system = buf.get_u8();
31184        __struct.target_component = buf.get_u8();
31185        __struct.payload_length = buf.get_u8();
31186        for v in &mut __struct.payload {
31187            let val = buf.get_u8();
31188            *v = val;
31189        }
31190        Ok(__struct)
31191    }
31192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31193        let mut __tmp = BytesMut::new(bytes);
31194        #[allow(clippy::absurd_extreme_comparisons)]
31195        #[allow(unused_comparisons)]
31196        if __tmp.remaining() < Self::ENCODED_LEN {
31197            panic!(
31198                "buffer is too small (need {} bytes, but got {})",
31199                Self::ENCODED_LEN,
31200                __tmp.remaining(),
31201            )
31202        }
31203        __tmp.put_u16_le(self.payload_type as u16);
31204        __tmp.put_u8(self.target_system);
31205        __tmp.put_u8(self.target_component);
31206        __tmp.put_u8(self.payload_length);
31207        for val in &self.payload {
31208            __tmp.put_u8(*val);
31209        }
31210        if matches!(version, MavlinkVersion::V2) {
31211            let len = __tmp.len();
31212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31213        } else {
31214            __tmp.len()
31215        }
31216    }
31217}
31218#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31219#[doc = ""]
31220#[doc = "ID: 311"]
31221#[derive(Debug, Clone, PartialEq)]
31222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31224#[cfg_attr(feature = "ts", derive(TS))]
31225#[cfg_attr(feature = "ts", ts(export))]
31226pub struct UAVCAN_NODE_INFO_DATA {
31227    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31228    pub time_usec: u64,
31229    #[doc = "Time since the start-up of the node."]
31230    pub uptime_sec: u32,
31231    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31232    pub sw_vcs_commit: u32,
31233    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31234    #[cfg_attr(feature = "ts", ts(type = "string"))]
31235    pub name: CharArray<80>,
31236    #[doc = "Hardware major version number."]
31237    pub hw_version_major: u8,
31238    #[doc = "Hardware minor version number."]
31239    pub hw_version_minor: u8,
31240    #[doc = "Hardware unique 128-bit ID."]
31241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31243    pub hw_unique_id: [u8; 16],
31244    #[doc = "Software major version number."]
31245    pub sw_version_major: u8,
31246    #[doc = "Software minor version number."]
31247    pub sw_version_minor: u8,
31248}
31249impl UAVCAN_NODE_INFO_DATA {
31250    pub const ENCODED_LEN: usize = 116usize;
31251    pub const DEFAULT: Self = Self {
31252        time_usec: 0_u64,
31253        uptime_sec: 0_u32,
31254        sw_vcs_commit: 0_u32,
31255        name: CharArray::new([0_u8; 80usize]),
31256        hw_version_major: 0_u8,
31257        hw_version_minor: 0_u8,
31258        hw_unique_id: [0_u8; 16usize],
31259        sw_version_major: 0_u8,
31260        sw_version_minor: 0_u8,
31261    };
31262    #[cfg(feature = "arbitrary")]
31263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31264        use arbitrary::{Arbitrary, Unstructured};
31265        let mut buf = [0u8; 1024];
31266        rng.fill_bytes(&mut buf);
31267        let mut unstructured = Unstructured::new(&buf);
31268        Self::arbitrary(&mut unstructured).unwrap_or_default()
31269    }
31270}
31271impl Default for UAVCAN_NODE_INFO_DATA {
31272    fn default() -> Self {
31273        Self::DEFAULT.clone()
31274    }
31275}
31276impl MessageData for UAVCAN_NODE_INFO_DATA {
31277    type Message = MavMessage;
31278    const ID: u32 = 311u32;
31279    const NAME: &'static str = "UAVCAN_NODE_INFO";
31280    const EXTRA_CRC: u8 = 95u8;
31281    const ENCODED_LEN: usize = 116usize;
31282    fn deser(
31283        _version: MavlinkVersion,
31284        __input: &[u8],
31285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31286        let avail_len = __input.len();
31287        let mut payload_buf = [0; Self::ENCODED_LEN];
31288        let mut buf = if avail_len < Self::ENCODED_LEN {
31289            payload_buf[0..avail_len].copy_from_slice(__input);
31290            Bytes::new(&payload_buf)
31291        } else {
31292            Bytes::new(__input)
31293        };
31294        let mut __struct = Self::default();
31295        __struct.time_usec = buf.get_u64_le();
31296        __struct.uptime_sec = buf.get_u32_le();
31297        __struct.sw_vcs_commit = buf.get_u32_le();
31298        let mut tmp = [0_u8; 80usize];
31299        for v in &mut tmp {
31300            *v = buf.get_u8();
31301        }
31302        __struct.name = CharArray::new(tmp);
31303        __struct.hw_version_major = buf.get_u8();
31304        __struct.hw_version_minor = buf.get_u8();
31305        for v in &mut __struct.hw_unique_id {
31306            let val = buf.get_u8();
31307            *v = val;
31308        }
31309        __struct.sw_version_major = buf.get_u8();
31310        __struct.sw_version_minor = buf.get_u8();
31311        Ok(__struct)
31312    }
31313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31314        let mut __tmp = BytesMut::new(bytes);
31315        #[allow(clippy::absurd_extreme_comparisons)]
31316        #[allow(unused_comparisons)]
31317        if __tmp.remaining() < Self::ENCODED_LEN {
31318            panic!(
31319                "buffer is too small (need {} bytes, but got {})",
31320                Self::ENCODED_LEN,
31321                __tmp.remaining(),
31322            )
31323        }
31324        __tmp.put_u64_le(self.time_usec);
31325        __tmp.put_u32_le(self.uptime_sec);
31326        __tmp.put_u32_le(self.sw_vcs_commit);
31327        for val in &self.name {
31328            __tmp.put_u8(*val);
31329        }
31330        __tmp.put_u8(self.hw_version_major);
31331        __tmp.put_u8(self.hw_version_minor);
31332        for val in &self.hw_unique_id {
31333            __tmp.put_u8(*val);
31334        }
31335        __tmp.put_u8(self.sw_version_major);
31336        __tmp.put_u8(self.sw_version_minor);
31337        if matches!(version, MavlinkVersion::V2) {
31338            let len = __tmp.len();
31339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31340        } else {
31341            __tmp.len()
31342        }
31343    }
31344}
31345#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31346#[doc = ""]
31347#[doc = "ID: 310"]
31348#[derive(Debug, Clone, PartialEq)]
31349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31351#[cfg_attr(feature = "ts", derive(TS))]
31352#[cfg_attr(feature = "ts", ts(export))]
31353pub struct UAVCAN_NODE_STATUS_DATA {
31354    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31355    pub time_usec: u64,
31356    #[doc = "Time since the start-up of the node."]
31357    pub uptime_sec: u32,
31358    #[doc = "Vendor-specific status information."]
31359    pub vendor_specific_status_code: u16,
31360    #[doc = "Generalized node health status."]
31361    pub health: UavcanNodeHealth,
31362    #[doc = "Generalized operating mode."]
31363    pub mode: UavcanNodeMode,
31364    #[doc = "Not used currently."]
31365    pub sub_mode: u8,
31366}
31367impl UAVCAN_NODE_STATUS_DATA {
31368    pub const ENCODED_LEN: usize = 17usize;
31369    pub const DEFAULT: Self = Self {
31370        time_usec: 0_u64,
31371        uptime_sec: 0_u32,
31372        vendor_specific_status_code: 0_u16,
31373        health: UavcanNodeHealth::DEFAULT,
31374        mode: UavcanNodeMode::DEFAULT,
31375        sub_mode: 0_u8,
31376    };
31377    #[cfg(feature = "arbitrary")]
31378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31379        use arbitrary::{Arbitrary, Unstructured};
31380        let mut buf = [0u8; 1024];
31381        rng.fill_bytes(&mut buf);
31382        let mut unstructured = Unstructured::new(&buf);
31383        Self::arbitrary(&mut unstructured).unwrap_or_default()
31384    }
31385}
31386impl Default for UAVCAN_NODE_STATUS_DATA {
31387    fn default() -> Self {
31388        Self::DEFAULT.clone()
31389    }
31390}
31391impl MessageData for UAVCAN_NODE_STATUS_DATA {
31392    type Message = MavMessage;
31393    const ID: u32 = 310u32;
31394    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31395    const EXTRA_CRC: u8 = 28u8;
31396    const ENCODED_LEN: usize = 17usize;
31397    fn deser(
31398        _version: MavlinkVersion,
31399        __input: &[u8],
31400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31401        let avail_len = __input.len();
31402        let mut payload_buf = [0; Self::ENCODED_LEN];
31403        let mut buf = if avail_len < Self::ENCODED_LEN {
31404            payload_buf[0..avail_len].copy_from_slice(__input);
31405            Bytes::new(&payload_buf)
31406        } else {
31407            Bytes::new(__input)
31408        };
31409        let mut __struct = Self::default();
31410        __struct.time_usec = buf.get_u64_le();
31411        __struct.uptime_sec = buf.get_u32_le();
31412        __struct.vendor_specific_status_code = buf.get_u16_le();
31413        let tmp = buf.get_u8();
31414        __struct.health =
31415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31416                enum_type: "UavcanNodeHealth",
31417                value: tmp as u64,
31418            })?;
31419        let tmp = buf.get_u8();
31420        __struct.mode =
31421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31422                enum_type: "UavcanNodeMode",
31423                value: tmp as u64,
31424            })?;
31425        __struct.sub_mode = buf.get_u8();
31426        Ok(__struct)
31427    }
31428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31429        let mut __tmp = BytesMut::new(bytes);
31430        #[allow(clippy::absurd_extreme_comparisons)]
31431        #[allow(unused_comparisons)]
31432        if __tmp.remaining() < Self::ENCODED_LEN {
31433            panic!(
31434                "buffer is too small (need {} bytes, but got {})",
31435                Self::ENCODED_LEN,
31436                __tmp.remaining(),
31437            )
31438        }
31439        __tmp.put_u64_le(self.time_usec);
31440        __tmp.put_u32_le(self.uptime_sec);
31441        __tmp.put_u16_le(self.vendor_specific_status_code);
31442        __tmp.put_u8(self.health as u8);
31443        __tmp.put_u8(self.mode as u8);
31444        __tmp.put_u8(self.sub_mode);
31445        if matches!(version, MavlinkVersion::V2) {
31446            let len = __tmp.len();
31447            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31448        } else {
31449            __tmp.len()
31450        }
31451    }
31452}
31453#[doc = "The global position resulting from GPS and sensor fusion."]
31454#[doc = ""]
31455#[doc = "ID: 340"]
31456#[derive(Debug, Clone, PartialEq)]
31457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31459#[cfg_attr(feature = "ts", derive(TS))]
31460#[cfg_attr(feature = "ts", ts(export))]
31461pub struct UTM_GLOBAL_POSITION_DATA {
31462    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31463    pub time: u64,
31464    #[doc = "Latitude (WGS84)"]
31465    pub lat: i32,
31466    #[doc = "Longitude (WGS84)"]
31467    pub lon: i32,
31468    #[doc = "Altitude (WGS84)"]
31469    pub alt: i32,
31470    #[doc = "Altitude above ground"]
31471    pub relative_alt: i32,
31472    #[doc = "Next waypoint, latitude (WGS84)"]
31473    pub next_lat: i32,
31474    #[doc = "Next waypoint, longitude (WGS84)"]
31475    pub next_lon: i32,
31476    #[doc = "Next waypoint, altitude (WGS84)"]
31477    pub next_alt: i32,
31478    #[doc = "Ground X speed (latitude, positive north)"]
31479    pub vx: i16,
31480    #[doc = "Ground Y speed (longitude, positive east)"]
31481    pub vy: i16,
31482    #[doc = "Ground Z speed (altitude, positive down)"]
31483    pub vz: i16,
31484    #[doc = "Horizontal position uncertainty (standard deviation)"]
31485    pub h_acc: u16,
31486    #[doc = "Altitude uncertainty (standard deviation)"]
31487    pub v_acc: u16,
31488    #[doc = "Speed uncertainty (standard deviation)"]
31489    pub vel_acc: u16,
31490    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31491    pub update_rate: u16,
31492    #[doc = "Unique UAS ID."]
31493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31494    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31495    pub uas_id: [u8; 18],
31496    #[doc = "Flight state"]
31497    pub flight_state: UtmFlightState,
31498    #[doc = "Bitwise OR combination of the data available flags."]
31499    pub flags: UtmDataAvailFlags,
31500}
31501impl UTM_GLOBAL_POSITION_DATA {
31502    pub const ENCODED_LEN: usize = 70usize;
31503    pub const DEFAULT: Self = Self {
31504        time: 0_u64,
31505        lat: 0_i32,
31506        lon: 0_i32,
31507        alt: 0_i32,
31508        relative_alt: 0_i32,
31509        next_lat: 0_i32,
31510        next_lon: 0_i32,
31511        next_alt: 0_i32,
31512        vx: 0_i16,
31513        vy: 0_i16,
31514        vz: 0_i16,
31515        h_acc: 0_u16,
31516        v_acc: 0_u16,
31517        vel_acc: 0_u16,
31518        update_rate: 0_u16,
31519        uas_id: [0_u8; 18usize],
31520        flight_state: UtmFlightState::DEFAULT,
31521        flags: UtmDataAvailFlags::DEFAULT,
31522    };
31523    #[cfg(feature = "arbitrary")]
31524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31525        use arbitrary::{Arbitrary, Unstructured};
31526        let mut buf = [0u8; 1024];
31527        rng.fill_bytes(&mut buf);
31528        let mut unstructured = Unstructured::new(&buf);
31529        Self::arbitrary(&mut unstructured).unwrap_or_default()
31530    }
31531}
31532impl Default for UTM_GLOBAL_POSITION_DATA {
31533    fn default() -> Self {
31534        Self::DEFAULT.clone()
31535    }
31536}
31537impl MessageData for UTM_GLOBAL_POSITION_DATA {
31538    type Message = MavMessage;
31539    const ID: u32 = 340u32;
31540    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31541    const EXTRA_CRC: u8 = 99u8;
31542    const ENCODED_LEN: usize = 70usize;
31543    fn deser(
31544        _version: MavlinkVersion,
31545        __input: &[u8],
31546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31547        let avail_len = __input.len();
31548        let mut payload_buf = [0; Self::ENCODED_LEN];
31549        let mut buf = if avail_len < Self::ENCODED_LEN {
31550            payload_buf[0..avail_len].copy_from_slice(__input);
31551            Bytes::new(&payload_buf)
31552        } else {
31553            Bytes::new(__input)
31554        };
31555        let mut __struct = Self::default();
31556        __struct.time = buf.get_u64_le();
31557        __struct.lat = buf.get_i32_le();
31558        __struct.lon = buf.get_i32_le();
31559        __struct.alt = buf.get_i32_le();
31560        __struct.relative_alt = buf.get_i32_le();
31561        __struct.next_lat = buf.get_i32_le();
31562        __struct.next_lon = buf.get_i32_le();
31563        __struct.next_alt = buf.get_i32_le();
31564        __struct.vx = buf.get_i16_le();
31565        __struct.vy = buf.get_i16_le();
31566        __struct.vz = buf.get_i16_le();
31567        __struct.h_acc = buf.get_u16_le();
31568        __struct.v_acc = buf.get_u16_le();
31569        __struct.vel_acc = buf.get_u16_le();
31570        __struct.update_rate = buf.get_u16_le();
31571        for v in &mut __struct.uas_id {
31572            let val = buf.get_u8();
31573            *v = val;
31574        }
31575        let tmp = buf.get_u8();
31576        __struct.flight_state =
31577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31578                enum_type: "UtmFlightState",
31579                value: tmp as u64,
31580            })?;
31581        let tmp = buf.get_u8();
31582        __struct.flags = UtmDataAvailFlags::from_bits(tmp).ok_or(
31583            ::mavlink_core::error::ParserError::InvalidFlag {
31584                flag_type: "UtmDataAvailFlags",
31585                value: tmp as u64,
31586            },
31587        )?;
31588        Ok(__struct)
31589    }
31590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31591        let mut __tmp = BytesMut::new(bytes);
31592        #[allow(clippy::absurd_extreme_comparisons)]
31593        #[allow(unused_comparisons)]
31594        if __tmp.remaining() < Self::ENCODED_LEN {
31595            panic!(
31596                "buffer is too small (need {} bytes, but got {})",
31597                Self::ENCODED_LEN,
31598                __tmp.remaining(),
31599            )
31600        }
31601        __tmp.put_u64_le(self.time);
31602        __tmp.put_i32_le(self.lat);
31603        __tmp.put_i32_le(self.lon);
31604        __tmp.put_i32_le(self.alt);
31605        __tmp.put_i32_le(self.relative_alt);
31606        __tmp.put_i32_le(self.next_lat);
31607        __tmp.put_i32_le(self.next_lon);
31608        __tmp.put_i32_le(self.next_alt);
31609        __tmp.put_i16_le(self.vx);
31610        __tmp.put_i16_le(self.vy);
31611        __tmp.put_i16_le(self.vz);
31612        __tmp.put_u16_le(self.h_acc);
31613        __tmp.put_u16_le(self.v_acc);
31614        __tmp.put_u16_le(self.vel_acc);
31615        __tmp.put_u16_le(self.update_rate);
31616        for val in &self.uas_id {
31617            __tmp.put_u8(*val);
31618        }
31619        __tmp.put_u8(self.flight_state as u8);
31620        __tmp.put_u8(self.flags.bits());
31621        if matches!(version, MavlinkVersion::V2) {
31622            let len = __tmp.len();
31623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31624        } else {
31625            __tmp.len()
31626        }
31627    }
31628}
31629#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31630#[doc = ""]
31631#[doc = "ID: 248"]
31632#[derive(Debug, Clone, PartialEq)]
31633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31635#[cfg_attr(feature = "ts", derive(TS))]
31636#[cfg_attr(feature = "ts", ts(export))]
31637pub struct V2_EXTENSION_DATA {
31638    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31639    pub message_type: u16,
31640    #[doc = "Network ID (0 for broadcast)"]
31641    pub target_network: u8,
31642    #[doc = "System ID (0 for broadcast)"]
31643    pub target_system: u8,
31644    #[doc = "Component ID (0 for broadcast)"]
31645    pub target_component: u8,
31646    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31647    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31648    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31649    pub payload: [u8; 249],
31650}
31651impl V2_EXTENSION_DATA {
31652    pub const ENCODED_LEN: usize = 254usize;
31653    pub const DEFAULT: Self = Self {
31654        message_type: 0_u16,
31655        target_network: 0_u8,
31656        target_system: 0_u8,
31657        target_component: 0_u8,
31658        payload: [0_u8; 249usize],
31659    };
31660    #[cfg(feature = "arbitrary")]
31661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31662        use arbitrary::{Arbitrary, Unstructured};
31663        let mut buf = [0u8; 1024];
31664        rng.fill_bytes(&mut buf);
31665        let mut unstructured = Unstructured::new(&buf);
31666        Self::arbitrary(&mut unstructured).unwrap_or_default()
31667    }
31668}
31669impl Default for V2_EXTENSION_DATA {
31670    fn default() -> Self {
31671        Self::DEFAULT.clone()
31672    }
31673}
31674impl MessageData for V2_EXTENSION_DATA {
31675    type Message = MavMessage;
31676    const ID: u32 = 248u32;
31677    const NAME: &'static str = "V2_EXTENSION";
31678    const EXTRA_CRC: u8 = 8u8;
31679    const ENCODED_LEN: usize = 254usize;
31680    fn deser(
31681        _version: MavlinkVersion,
31682        __input: &[u8],
31683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31684        let avail_len = __input.len();
31685        let mut payload_buf = [0; Self::ENCODED_LEN];
31686        let mut buf = if avail_len < Self::ENCODED_LEN {
31687            payload_buf[0..avail_len].copy_from_slice(__input);
31688            Bytes::new(&payload_buf)
31689        } else {
31690            Bytes::new(__input)
31691        };
31692        let mut __struct = Self::default();
31693        __struct.message_type = buf.get_u16_le();
31694        __struct.target_network = buf.get_u8();
31695        __struct.target_system = buf.get_u8();
31696        __struct.target_component = buf.get_u8();
31697        for v in &mut __struct.payload {
31698            let val = buf.get_u8();
31699            *v = val;
31700        }
31701        Ok(__struct)
31702    }
31703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31704        let mut __tmp = BytesMut::new(bytes);
31705        #[allow(clippy::absurd_extreme_comparisons)]
31706        #[allow(unused_comparisons)]
31707        if __tmp.remaining() < Self::ENCODED_LEN {
31708            panic!(
31709                "buffer is too small (need {} bytes, but got {})",
31710                Self::ENCODED_LEN,
31711                __tmp.remaining(),
31712            )
31713        }
31714        __tmp.put_u16_le(self.message_type);
31715        __tmp.put_u8(self.target_network);
31716        __tmp.put_u8(self.target_system);
31717        __tmp.put_u8(self.target_component);
31718        for val in &self.payload {
31719            __tmp.put_u8(*val);
31720        }
31721        if matches!(version, MavlinkVersion::V2) {
31722            let len = __tmp.len();
31723            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31724        } else {
31725            __tmp.len()
31726        }
31727    }
31728}
31729#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31730#[doc = ""]
31731#[doc = "ID: 74"]
31732#[derive(Debug, Clone, PartialEq)]
31733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31735#[cfg_attr(feature = "ts", derive(TS))]
31736#[cfg_attr(feature = "ts", ts(export))]
31737pub struct VFR_HUD_DATA {
31738    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31739    pub airspeed: f32,
31740    #[doc = "Current ground speed."]
31741    pub groundspeed: f32,
31742    #[doc = "Current altitude (MSL)."]
31743    pub alt: f32,
31744    #[doc = "Current climb rate."]
31745    pub climb: f32,
31746    #[doc = "Current heading in compass units (0-360, 0=north)."]
31747    pub heading: i16,
31748    #[doc = "Current throttle setting (0 to 100)."]
31749    pub throttle: u16,
31750}
31751impl VFR_HUD_DATA {
31752    pub const ENCODED_LEN: usize = 20usize;
31753    pub const DEFAULT: Self = Self {
31754        airspeed: 0.0_f32,
31755        groundspeed: 0.0_f32,
31756        alt: 0.0_f32,
31757        climb: 0.0_f32,
31758        heading: 0_i16,
31759        throttle: 0_u16,
31760    };
31761    #[cfg(feature = "arbitrary")]
31762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31763        use arbitrary::{Arbitrary, Unstructured};
31764        let mut buf = [0u8; 1024];
31765        rng.fill_bytes(&mut buf);
31766        let mut unstructured = Unstructured::new(&buf);
31767        Self::arbitrary(&mut unstructured).unwrap_or_default()
31768    }
31769}
31770impl Default for VFR_HUD_DATA {
31771    fn default() -> Self {
31772        Self::DEFAULT.clone()
31773    }
31774}
31775impl MessageData for VFR_HUD_DATA {
31776    type Message = MavMessage;
31777    const ID: u32 = 74u32;
31778    const NAME: &'static str = "VFR_HUD";
31779    const EXTRA_CRC: u8 = 20u8;
31780    const ENCODED_LEN: usize = 20usize;
31781    fn deser(
31782        _version: MavlinkVersion,
31783        __input: &[u8],
31784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31785        let avail_len = __input.len();
31786        let mut payload_buf = [0; Self::ENCODED_LEN];
31787        let mut buf = if avail_len < Self::ENCODED_LEN {
31788            payload_buf[0..avail_len].copy_from_slice(__input);
31789            Bytes::new(&payload_buf)
31790        } else {
31791            Bytes::new(__input)
31792        };
31793        let mut __struct = Self::default();
31794        __struct.airspeed = buf.get_f32_le();
31795        __struct.groundspeed = buf.get_f32_le();
31796        __struct.alt = buf.get_f32_le();
31797        __struct.climb = buf.get_f32_le();
31798        __struct.heading = buf.get_i16_le();
31799        __struct.throttle = buf.get_u16_le();
31800        Ok(__struct)
31801    }
31802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31803        let mut __tmp = BytesMut::new(bytes);
31804        #[allow(clippy::absurd_extreme_comparisons)]
31805        #[allow(unused_comparisons)]
31806        if __tmp.remaining() < Self::ENCODED_LEN {
31807            panic!(
31808                "buffer is too small (need {} bytes, but got {})",
31809                Self::ENCODED_LEN,
31810                __tmp.remaining(),
31811            )
31812        }
31813        __tmp.put_f32_le(self.airspeed);
31814        __tmp.put_f32_le(self.groundspeed);
31815        __tmp.put_f32_le(self.alt);
31816        __tmp.put_f32_le(self.climb);
31817        __tmp.put_i16_le(self.heading);
31818        __tmp.put_u16_le(self.throttle);
31819        if matches!(version, MavlinkVersion::V2) {
31820            let len = __tmp.len();
31821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31822        } else {
31823            __tmp.len()
31824        }
31825    }
31826}
31827#[doc = "Vibration levels and accelerometer clipping."]
31828#[doc = ""]
31829#[doc = "ID: 241"]
31830#[derive(Debug, Clone, PartialEq)]
31831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31833#[cfg_attr(feature = "ts", derive(TS))]
31834#[cfg_attr(feature = "ts", ts(export))]
31835pub struct VIBRATION_DATA {
31836    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31837    pub time_usec: u64,
31838    #[doc = "Vibration levels on X-axis"]
31839    pub vibration_x: f32,
31840    #[doc = "Vibration levels on Y-axis"]
31841    pub vibration_y: f32,
31842    #[doc = "Vibration levels on Z-axis"]
31843    pub vibration_z: f32,
31844    #[doc = "first accelerometer clipping count"]
31845    pub clipping_0: u32,
31846    #[doc = "second accelerometer clipping count"]
31847    pub clipping_1: u32,
31848    #[doc = "third accelerometer clipping count"]
31849    pub clipping_2: u32,
31850}
31851impl VIBRATION_DATA {
31852    pub const ENCODED_LEN: usize = 32usize;
31853    pub const DEFAULT: Self = Self {
31854        time_usec: 0_u64,
31855        vibration_x: 0.0_f32,
31856        vibration_y: 0.0_f32,
31857        vibration_z: 0.0_f32,
31858        clipping_0: 0_u32,
31859        clipping_1: 0_u32,
31860        clipping_2: 0_u32,
31861    };
31862    #[cfg(feature = "arbitrary")]
31863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31864        use arbitrary::{Arbitrary, Unstructured};
31865        let mut buf = [0u8; 1024];
31866        rng.fill_bytes(&mut buf);
31867        let mut unstructured = Unstructured::new(&buf);
31868        Self::arbitrary(&mut unstructured).unwrap_or_default()
31869    }
31870}
31871impl Default for VIBRATION_DATA {
31872    fn default() -> Self {
31873        Self::DEFAULT.clone()
31874    }
31875}
31876impl MessageData for VIBRATION_DATA {
31877    type Message = MavMessage;
31878    const ID: u32 = 241u32;
31879    const NAME: &'static str = "VIBRATION";
31880    const EXTRA_CRC: u8 = 90u8;
31881    const ENCODED_LEN: usize = 32usize;
31882    fn deser(
31883        _version: MavlinkVersion,
31884        __input: &[u8],
31885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31886        let avail_len = __input.len();
31887        let mut payload_buf = [0; Self::ENCODED_LEN];
31888        let mut buf = if avail_len < Self::ENCODED_LEN {
31889            payload_buf[0..avail_len].copy_from_slice(__input);
31890            Bytes::new(&payload_buf)
31891        } else {
31892            Bytes::new(__input)
31893        };
31894        let mut __struct = Self::default();
31895        __struct.time_usec = buf.get_u64_le();
31896        __struct.vibration_x = buf.get_f32_le();
31897        __struct.vibration_y = buf.get_f32_le();
31898        __struct.vibration_z = buf.get_f32_le();
31899        __struct.clipping_0 = buf.get_u32_le();
31900        __struct.clipping_1 = buf.get_u32_le();
31901        __struct.clipping_2 = buf.get_u32_le();
31902        Ok(__struct)
31903    }
31904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31905        let mut __tmp = BytesMut::new(bytes);
31906        #[allow(clippy::absurd_extreme_comparisons)]
31907        #[allow(unused_comparisons)]
31908        if __tmp.remaining() < Self::ENCODED_LEN {
31909            panic!(
31910                "buffer is too small (need {} bytes, but got {})",
31911                Self::ENCODED_LEN,
31912                __tmp.remaining(),
31913            )
31914        }
31915        __tmp.put_u64_le(self.time_usec);
31916        __tmp.put_f32_le(self.vibration_x);
31917        __tmp.put_f32_le(self.vibration_y);
31918        __tmp.put_f32_le(self.vibration_z);
31919        __tmp.put_u32_le(self.clipping_0);
31920        __tmp.put_u32_le(self.clipping_1);
31921        __tmp.put_u32_le(self.clipping_2);
31922        if matches!(version, MavlinkVersion::V2) {
31923            let len = __tmp.len();
31924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31925        } else {
31926            __tmp.len()
31927        }
31928    }
31929}
31930#[doc = "Global position estimate from a Vicon motion system source."]
31931#[doc = ""]
31932#[doc = "ID: 104"]
31933#[derive(Debug, Clone, PartialEq)]
31934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31936#[cfg_attr(feature = "ts", derive(TS))]
31937#[cfg_attr(feature = "ts", ts(export))]
31938pub struct VICON_POSITION_ESTIMATE_DATA {
31939    #[doc = "Timestamp (UNIX time or time since system boot)"]
31940    pub usec: u64,
31941    #[doc = "Global X position"]
31942    pub x: f32,
31943    #[doc = "Global Y position"]
31944    pub y: f32,
31945    #[doc = "Global Z position"]
31946    pub z: f32,
31947    #[doc = "Roll angle"]
31948    pub roll: f32,
31949    #[doc = "Pitch angle"]
31950    pub pitch: f32,
31951    #[doc = "Yaw angle"]
31952    pub yaw: f32,
31953    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31957    pub covariance: [f32; 21],
31958}
31959impl VICON_POSITION_ESTIMATE_DATA {
31960    pub const ENCODED_LEN: usize = 116usize;
31961    pub const DEFAULT: Self = Self {
31962        usec: 0_u64,
31963        x: 0.0_f32,
31964        y: 0.0_f32,
31965        z: 0.0_f32,
31966        roll: 0.0_f32,
31967        pitch: 0.0_f32,
31968        yaw: 0.0_f32,
31969        covariance: [0.0_f32; 21usize],
31970    };
31971    #[cfg(feature = "arbitrary")]
31972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31973        use arbitrary::{Arbitrary, Unstructured};
31974        let mut buf = [0u8; 1024];
31975        rng.fill_bytes(&mut buf);
31976        let mut unstructured = Unstructured::new(&buf);
31977        Self::arbitrary(&mut unstructured).unwrap_or_default()
31978    }
31979}
31980impl Default for VICON_POSITION_ESTIMATE_DATA {
31981    fn default() -> Self {
31982        Self::DEFAULT.clone()
31983    }
31984}
31985impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31986    type Message = MavMessage;
31987    const ID: u32 = 104u32;
31988    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31989    const EXTRA_CRC: u8 = 56u8;
31990    const ENCODED_LEN: usize = 116usize;
31991    fn deser(
31992        _version: MavlinkVersion,
31993        __input: &[u8],
31994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31995        let avail_len = __input.len();
31996        let mut payload_buf = [0; Self::ENCODED_LEN];
31997        let mut buf = if avail_len < Self::ENCODED_LEN {
31998            payload_buf[0..avail_len].copy_from_slice(__input);
31999            Bytes::new(&payload_buf)
32000        } else {
32001            Bytes::new(__input)
32002        };
32003        let mut __struct = Self::default();
32004        __struct.usec = buf.get_u64_le();
32005        __struct.x = buf.get_f32_le();
32006        __struct.y = buf.get_f32_le();
32007        __struct.z = buf.get_f32_le();
32008        __struct.roll = buf.get_f32_le();
32009        __struct.pitch = buf.get_f32_le();
32010        __struct.yaw = buf.get_f32_le();
32011        for v in &mut __struct.covariance {
32012            let val = buf.get_f32_le();
32013            *v = val;
32014        }
32015        Ok(__struct)
32016    }
32017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32018        let mut __tmp = BytesMut::new(bytes);
32019        #[allow(clippy::absurd_extreme_comparisons)]
32020        #[allow(unused_comparisons)]
32021        if __tmp.remaining() < Self::ENCODED_LEN {
32022            panic!(
32023                "buffer is too small (need {} bytes, but got {})",
32024                Self::ENCODED_LEN,
32025                __tmp.remaining(),
32026            )
32027        }
32028        __tmp.put_u64_le(self.usec);
32029        __tmp.put_f32_le(self.x);
32030        __tmp.put_f32_le(self.y);
32031        __tmp.put_f32_le(self.z);
32032        __tmp.put_f32_le(self.roll);
32033        __tmp.put_f32_le(self.pitch);
32034        __tmp.put_f32_le(self.yaw);
32035        if matches!(version, MavlinkVersion::V2) {
32036            for val in &self.covariance {
32037                __tmp.put_f32_le(*val);
32038            }
32039            let len = __tmp.len();
32040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32041        } else {
32042            __tmp.len()
32043        }
32044    }
32045}
32046#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32047#[doc = ""]
32048#[doc = "ID: 269"]
32049#[derive(Debug, Clone, PartialEq)]
32050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32052#[cfg_attr(feature = "ts", derive(TS))]
32053#[cfg_attr(feature = "ts", ts(export))]
32054pub struct VIDEO_STREAM_INFORMATION_DATA {
32055    #[doc = "Frame rate."]
32056    pub framerate: f32,
32057    #[doc = "Bit rate."]
32058    pub bitrate: u32,
32059    #[doc = "Bitmap of stream status flags."]
32060    pub flags: VideoStreamStatusFlags,
32061    #[doc = "Horizontal resolution."]
32062    pub resolution_h: u16,
32063    #[doc = "Vertical resolution."]
32064    pub resolution_v: u16,
32065    #[doc = "Video image rotation clockwise."]
32066    pub rotation: u16,
32067    #[doc = "Horizontal Field of view."]
32068    pub hfov: u16,
32069    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32070    pub stream_id: u8,
32071    #[doc = "Number of streams available."]
32072    pub count: u8,
32073    #[doc = "Type of stream."]
32074    pub mavtype: VideoStreamType,
32075    #[doc = "Stream name."]
32076    #[cfg_attr(feature = "ts", ts(type = "string"))]
32077    pub name: CharArray<32>,
32078    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32079    #[cfg_attr(feature = "ts", ts(type = "string"))]
32080    pub uri: CharArray<160>,
32081    #[doc = "Encoding of stream."]
32082    #[cfg_attr(feature = "serde", serde(default))]
32083    pub encoding: VideoStreamEncoding,
32084    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32086    pub camera_device_id: u8,
32087}
32088impl VIDEO_STREAM_INFORMATION_DATA {
32089    pub const ENCODED_LEN: usize = 215usize;
32090    pub const DEFAULT: Self = Self {
32091        framerate: 0.0_f32,
32092        bitrate: 0_u32,
32093        flags: VideoStreamStatusFlags::DEFAULT,
32094        resolution_h: 0_u16,
32095        resolution_v: 0_u16,
32096        rotation: 0_u16,
32097        hfov: 0_u16,
32098        stream_id: 0_u8,
32099        count: 0_u8,
32100        mavtype: VideoStreamType::DEFAULT,
32101        name: CharArray::new([0_u8; 32usize]),
32102        uri: CharArray::new([0_u8; 160usize]),
32103        encoding: VideoStreamEncoding::DEFAULT,
32104        camera_device_id: 0_u8,
32105    };
32106    #[cfg(feature = "arbitrary")]
32107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32108        use arbitrary::{Arbitrary, Unstructured};
32109        let mut buf = [0u8; 1024];
32110        rng.fill_bytes(&mut buf);
32111        let mut unstructured = Unstructured::new(&buf);
32112        Self::arbitrary(&mut unstructured).unwrap_or_default()
32113    }
32114}
32115impl Default for VIDEO_STREAM_INFORMATION_DATA {
32116    fn default() -> Self {
32117        Self::DEFAULT.clone()
32118    }
32119}
32120impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32121    type Message = MavMessage;
32122    const ID: u32 = 269u32;
32123    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32124    const EXTRA_CRC: u8 = 109u8;
32125    const ENCODED_LEN: usize = 215usize;
32126    fn deser(
32127        _version: MavlinkVersion,
32128        __input: &[u8],
32129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32130        let avail_len = __input.len();
32131        let mut payload_buf = [0; Self::ENCODED_LEN];
32132        let mut buf = if avail_len < Self::ENCODED_LEN {
32133            payload_buf[0..avail_len].copy_from_slice(__input);
32134            Bytes::new(&payload_buf)
32135        } else {
32136            Bytes::new(__input)
32137        };
32138        let mut __struct = Self::default();
32139        __struct.framerate = buf.get_f32_le();
32140        __struct.bitrate = buf.get_u32_le();
32141        let tmp = buf.get_u16_le();
32142        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
32143            ::mavlink_core::error::ParserError::InvalidFlag {
32144                flag_type: "VideoStreamStatusFlags",
32145                value: tmp as u64,
32146            },
32147        )?;
32148        __struct.resolution_h = buf.get_u16_le();
32149        __struct.resolution_v = buf.get_u16_le();
32150        __struct.rotation = buf.get_u16_le();
32151        __struct.hfov = buf.get_u16_le();
32152        __struct.stream_id = buf.get_u8();
32153        __struct.count = buf.get_u8();
32154        let tmp = buf.get_u8();
32155        __struct.mavtype =
32156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32157                enum_type: "VideoStreamType",
32158                value: tmp as u64,
32159            })?;
32160        let mut tmp = [0_u8; 32usize];
32161        for v in &mut tmp {
32162            *v = buf.get_u8();
32163        }
32164        __struct.name = CharArray::new(tmp);
32165        let mut tmp = [0_u8; 160usize];
32166        for v in &mut tmp {
32167            *v = buf.get_u8();
32168        }
32169        __struct.uri = CharArray::new(tmp);
32170        let tmp = buf.get_u8();
32171        __struct.encoding =
32172            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32173                enum_type: "VideoStreamEncoding",
32174                value: tmp as u64,
32175            })?;
32176        __struct.camera_device_id = buf.get_u8();
32177        Ok(__struct)
32178    }
32179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32180        let mut __tmp = BytesMut::new(bytes);
32181        #[allow(clippy::absurd_extreme_comparisons)]
32182        #[allow(unused_comparisons)]
32183        if __tmp.remaining() < Self::ENCODED_LEN {
32184            panic!(
32185                "buffer is too small (need {} bytes, but got {})",
32186                Self::ENCODED_LEN,
32187                __tmp.remaining(),
32188            )
32189        }
32190        __tmp.put_f32_le(self.framerate);
32191        __tmp.put_u32_le(self.bitrate);
32192        __tmp.put_u16_le(self.flags.bits());
32193        __tmp.put_u16_le(self.resolution_h);
32194        __tmp.put_u16_le(self.resolution_v);
32195        __tmp.put_u16_le(self.rotation);
32196        __tmp.put_u16_le(self.hfov);
32197        __tmp.put_u8(self.stream_id);
32198        __tmp.put_u8(self.count);
32199        __tmp.put_u8(self.mavtype as u8);
32200        for val in &self.name {
32201            __tmp.put_u8(*val);
32202        }
32203        for val in &self.uri {
32204            __tmp.put_u8(*val);
32205        }
32206        if matches!(version, MavlinkVersion::V2) {
32207            __tmp.put_u8(self.encoding as u8);
32208            __tmp.put_u8(self.camera_device_id);
32209            let len = __tmp.len();
32210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32211        } else {
32212            __tmp.len()
32213        }
32214    }
32215}
32216#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32217#[doc = ""]
32218#[doc = "ID: 270"]
32219#[derive(Debug, Clone, PartialEq)]
32220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32222#[cfg_attr(feature = "ts", derive(TS))]
32223#[cfg_attr(feature = "ts", ts(export))]
32224pub struct VIDEO_STREAM_STATUS_DATA {
32225    #[doc = "Frame rate"]
32226    pub framerate: f32,
32227    #[doc = "Bit rate"]
32228    pub bitrate: u32,
32229    #[doc = "Bitmap of stream status flags"]
32230    pub flags: VideoStreamStatusFlags,
32231    #[doc = "Horizontal resolution"]
32232    pub resolution_h: u16,
32233    #[doc = "Vertical resolution"]
32234    pub resolution_v: u16,
32235    #[doc = "Video image rotation clockwise"]
32236    pub rotation: u16,
32237    #[doc = "Horizontal Field of view"]
32238    pub hfov: u16,
32239    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32240    pub stream_id: u8,
32241    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32243    pub camera_device_id: u8,
32244}
32245impl VIDEO_STREAM_STATUS_DATA {
32246    pub const ENCODED_LEN: usize = 20usize;
32247    pub const DEFAULT: Self = Self {
32248        framerate: 0.0_f32,
32249        bitrate: 0_u32,
32250        flags: VideoStreamStatusFlags::DEFAULT,
32251        resolution_h: 0_u16,
32252        resolution_v: 0_u16,
32253        rotation: 0_u16,
32254        hfov: 0_u16,
32255        stream_id: 0_u8,
32256        camera_device_id: 0_u8,
32257    };
32258    #[cfg(feature = "arbitrary")]
32259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32260        use arbitrary::{Arbitrary, Unstructured};
32261        let mut buf = [0u8; 1024];
32262        rng.fill_bytes(&mut buf);
32263        let mut unstructured = Unstructured::new(&buf);
32264        Self::arbitrary(&mut unstructured).unwrap_or_default()
32265    }
32266}
32267impl Default for VIDEO_STREAM_STATUS_DATA {
32268    fn default() -> Self {
32269        Self::DEFAULT.clone()
32270    }
32271}
32272impl MessageData for VIDEO_STREAM_STATUS_DATA {
32273    type Message = MavMessage;
32274    const ID: u32 = 270u32;
32275    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32276    const EXTRA_CRC: u8 = 59u8;
32277    const ENCODED_LEN: usize = 20usize;
32278    fn deser(
32279        _version: MavlinkVersion,
32280        __input: &[u8],
32281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32282        let avail_len = __input.len();
32283        let mut payload_buf = [0; Self::ENCODED_LEN];
32284        let mut buf = if avail_len < Self::ENCODED_LEN {
32285            payload_buf[0..avail_len].copy_from_slice(__input);
32286            Bytes::new(&payload_buf)
32287        } else {
32288            Bytes::new(__input)
32289        };
32290        let mut __struct = Self::default();
32291        __struct.framerate = buf.get_f32_le();
32292        __struct.bitrate = buf.get_u32_le();
32293        let tmp = buf.get_u16_le();
32294        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
32295            ::mavlink_core::error::ParserError::InvalidFlag {
32296                flag_type: "VideoStreamStatusFlags",
32297                value: tmp as u64,
32298            },
32299        )?;
32300        __struct.resolution_h = buf.get_u16_le();
32301        __struct.resolution_v = buf.get_u16_le();
32302        __struct.rotation = buf.get_u16_le();
32303        __struct.hfov = buf.get_u16_le();
32304        __struct.stream_id = buf.get_u8();
32305        __struct.camera_device_id = buf.get_u8();
32306        Ok(__struct)
32307    }
32308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32309        let mut __tmp = BytesMut::new(bytes);
32310        #[allow(clippy::absurd_extreme_comparisons)]
32311        #[allow(unused_comparisons)]
32312        if __tmp.remaining() < Self::ENCODED_LEN {
32313            panic!(
32314                "buffer is too small (need {} bytes, but got {})",
32315                Self::ENCODED_LEN,
32316                __tmp.remaining(),
32317            )
32318        }
32319        __tmp.put_f32_le(self.framerate);
32320        __tmp.put_u32_le(self.bitrate);
32321        __tmp.put_u16_le(self.flags.bits());
32322        __tmp.put_u16_le(self.resolution_h);
32323        __tmp.put_u16_le(self.resolution_v);
32324        __tmp.put_u16_le(self.rotation);
32325        __tmp.put_u16_le(self.hfov);
32326        __tmp.put_u8(self.stream_id);
32327        if matches!(version, MavlinkVersion::V2) {
32328            __tmp.put_u8(self.camera_device_id);
32329            let len = __tmp.len();
32330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32331        } else {
32332            __tmp.len()
32333        }
32334    }
32335}
32336#[doc = "Local position/attitude estimate from a vision source."]
32337#[doc = ""]
32338#[doc = "ID: 102"]
32339#[derive(Debug, Clone, PartialEq)]
32340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32342#[cfg_attr(feature = "ts", derive(TS))]
32343#[cfg_attr(feature = "ts", ts(export))]
32344pub struct VISION_POSITION_ESTIMATE_DATA {
32345    #[doc = "Timestamp (UNIX time or time since system boot)"]
32346    pub usec: u64,
32347    #[doc = "Local X position"]
32348    pub x: f32,
32349    #[doc = "Local Y position"]
32350    pub y: f32,
32351    #[doc = "Local Z position"]
32352    pub z: f32,
32353    #[doc = "Roll angle"]
32354    pub roll: f32,
32355    #[doc = "Pitch angle"]
32356    pub pitch: f32,
32357    #[doc = "Yaw angle"]
32358    pub yaw: f32,
32359    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32360    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32363    pub covariance: [f32; 21],
32364    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32366    pub reset_counter: u8,
32367}
32368impl VISION_POSITION_ESTIMATE_DATA {
32369    pub const ENCODED_LEN: usize = 117usize;
32370    pub const DEFAULT: Self = Self {
32371        usec: 0_u64,
32372        x: 0.0_f32,
32373        y: 0.0_f32,
32374        z: 0.0_f32,
32375        roll: 0.0_f32,
32376        pitch: 0.0_f32,
32377        yaw: 0.0_f32,
32378        covariance: [0.0_f32; 21usize],
32379        reset_counter: 0_u8,
32380    };
32381    #[cfg(feature = "arbitrary")]
32382    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32383        use arbitrary::{Arbitrary, Unstructured};
32384        let mut buf = [0u8; 1024];
32385        rng.fill_bytes(&mut buf);
32386        let mut unstructured = Unstructured::new(&buf);
32387        Self::arbitrary(&mut unstructured).unwrap_or_default()
32388    }
32389}
32390impl Default for VISION_POSITION_ESTIMATE_DATA {
32391    fn default() -> Self {
32392        Self::DEFAULT.clone()
32393    }
32394}
32395impl MessageData for VISION_POSITION_ESTIMATE_DATA {
32396    type Message = MavMessage;
32397    const ID: u32 = 102u32;
32398    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
32399    const EXTRA_CRC: u8 = 158u8;
32400    const ENCODED_LEN: usize = 117usize;
32401    fn deser(
32402        _version: MavlinkVersion,
32403        __input: &[u8],
32404    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32405        let avail_len = __input.len();
32406        let mut payload_buf = [0; Self::ENCODED_LEN];
32407        let mut buf = if avail_len < Self::ENCODED_LEN {
32408            payload_buf[0..avail_len].copy_from_slice(__input);
32409            Bytes::new(&payload_buf)
32410        } else {
32411            Bytes::new(__input)
32412        };
32413        let mut __struct = Self::default();
32414        __struct.usec = buf.get_u64_le();
32415        __struct.x = buf.get_f32_le();
32416        __struct.y = buf.get_f32_le();
32417        __struct.z = buf.get_f32_le();
32418        __struct.roll = buf.get_f32_le();
32419        __struct.pitch = buf.get_f32_le();
32420        __struct.yaw = buf.get_f32_le();
32421        for v in &mut __struct.covariance {
32422            let val = buf.get_f32_le();
32423            *v = val;
32424        }
32425        __struct.reset_counter = buf.get_u8();
32426        Ok(__struct)
32427    }
32428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32429        let mut __tmp = BytesMut::new(bytes);
32430        #[allow(clippy::absurd_extreme_comparisons)]
32431        #[allow(unused_comparisons)]
32432        if __tmp.remaining() < Self::ENCODED_LEN {
32433            panic!(
32434                "buffer is too small (need {} bytes, but got {})",
32435                Self::ENCODED_LEN,
32436                __tmp.remaining(),
32437            )
32438        }
32439        __tmp.put_u64_le(self.usec);
32440        __tmp.put_f32_le(self.x);
32441        __tmp.put_f32_le(self.y);
32442        __tmp.put_f32_le(self.z);
32443        __tmp.put_f32_le(self.roll);
32444        __tmp.put_f32_le(self.pitch);
32445        __tmp.put_f32_le(self.yaw);
32446        if matches!(version, MavlinkVersion::V2) {
32447            for val in &self.covariance {
32448                __tmp.put_f32_le(*val);
32449            }
32450            __tmp.put_u8(self.reset_counter);
32451            let len = __tmp.len();
32452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32453        } else {
32454            __tmp.len()
32455        }
32456    }
32457}
32458#[doc = "Speed estimate from a vision source."]
32459#[doc = ""]
32460#[doc = "ID: 103"]
32461#[derive(Debug, Clone, PartialEq)]
32462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32464#[cfg_attr(feature = "ts", derive(TS))]
32465#[cfg_attr(feature = "ts", ts(export))]
32466pub struct VISION_SPEED_ESTIMATE_DATA {
32467    #[doc = "Timestamp (UNIX time or time since system boot)"]
32468    pub usec: u64,
32469    #[doc = "Global X speed"]
32470    pub x: f32,
32471    #[doc = "Global Y speed"]
32472    pub y: f32,
32473    #[doc = "Global Z speed"]
32474    pub z: f32,
32475    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32476    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32479    pub covariance: [f32; 9],
32480    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32482    pub reset_counter: u8,
32483}
32484impl VISION_SPEED_ESTIMATE_DATA {
32485    pub const ENCODED_LEN: usize = 57usize;
32486    pub const DEFAULT: Self = Self {
32487        usec: 0_u64,
32488        x: 0.0_f32,
32489        y: 0.0_f32,
32490        z: 0.0_f32,
32491        covariance: [0.0_f32; 9usize],
32492        reset_counter: 0_u8,
32493    };
32494    #[cfg(feature = "arbitrary")]
32495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32496        use arbitrary::{Arbitrary, Unstructured};
32497        let mut buf = [0u8; 1024];
32498        rng.fill_bytes(&mut buf);
32499        let mut unstructured = Unstructured::new(&buf);
32500        Self::arbitrary(&mut unstructured).unwrap_or_default()
32501    }
32502}
32503impl Default for VISION_SPEED_ESTIMATE_DATA {
32504    fn default() -> Self {
32505        Self::DEFAULT.clone()
32506    }
32507}
32508impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32509    type Message = MavMessage;
32510    const ID: u32 = 103u32;
32511    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32512    const EXTRA_CRC: u8 = 208u8;
32513    const ENCODED_LEN: usize = 57usize;
32514    fn deser(
32515        _version: MavlinkVersion,
32516        __input: &[u8],
32517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32518        let avail_len = __input.len();
32519        let mut payload_buf = [0; Self::ENCODED_LEN];
32520        let mut buf = if avail_len < Self::ENCODED_LEN {
32521            payload_buf[0..avail_len].copy_from_slice(__input);
32522            Bytes::new(&payload_buf)
32523        } else {
32524            Bytes::new(__input)
32525        };
32526        let mut __struct = Self::default();
32527        __struct.usec = buf.get_u64_le();
32528        __struct.x = buf.get_f32_le();
32529        __struct.y = buf.get_f32_le();
32530        __struct.z = buf.get_f32_le();
32531        for v in &mut __struct.covariance {
32532            let val = buf.get_f32_le();
32533            *v = val;
32534        }
32535        __struct.reset_counter = buf.get_u8();
32536        Ok(__struct)
32537    }
32538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32539        let mut __tmp = BytesMut::new(bytes);
32540        #[allow(clippy::absurd_extreme_comparisons)]
32541        #[allow(unused_comparisons)]
32542        if __tmp.remaining() < Self::ENCODED_LEN {
32543            panic!(
32544                "buffer is too small (need {} bytes, but got {})",
32545                Self::ENCODED_LEN,
32546                __tmp.remaining(),
32547            )
32548        }
32549        __tmp.put_u64_le(self.usec);
32550        __tmp.put_f32_le(self.x);
32551        __tmp.put_f32_le(self.y);
32552        __tmp.put_f32_le(self.z);
32553        if matches!(version, MavlinkVersion::V2) {
32554            for val in &self.covariance {
32555                __tmp.put_f32_le(*val);
32556            }
32557            __tmp.put_u8(self.reset_counter);
32558            let len = __tmp.len();
32559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32560        } else {
32561            __tmp.len()
32562        }
32563    }
32564}
32565#[doc = "Cumulative distance traveled for each reported wheel."]
32566#[doc = ""]
32567#[doc = "ID: 9000"]
32568#[derive(Debug, Clone, PartialEq)]
32569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32571#[cfg_attr(feature = "ts", derive(TS))]
32572#[cfg_attr(feature = "ts", ts(export))]
32573pub struct WHEEL_DISTANCE_DATA {
32574    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32575    pub time_usec: u64,
32576    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32578    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32579    pub distance: [f64; 16],
32580    #[doc = "Number of wheels reported."]
32581    pub count: u8,
32582}
32583impl WHEEL_DISTANCE_DATA {
32584    pub const ENCODED_LEN: usize = 137usize;
32585    pub const DEFAULT: Self = Self {
32586        time_usec: 0_u64,
32587        distance: [0.0_f64; 16usize],
32588        count: 0_u8,
32589    };
32590    #[cfg(feature = "arbitrary")]
32591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32592        use arbitrary::{Arbitrary, Unstructured};
32593        let mut buf = [0u8; 1024];
32594        rng.fill_bytes(&mut buf);
32595        let mut unstructured = Unstructured::new(&buf);
32596        Self::arbitrary(&mut unstructured).unwrap_or_default()
32597    }
32598}
32599impl Default for WHEEL_DISTANCE_DATA {
32600    fn default() -> Self {
32601        Self::DEFAULT.clone()
32602    }
32603}
32604impl MessageData for WHEEL_DISTANCE_DATA {
32605    type Message = MavMessage;
32606    const ID: u32 = 9000u32;
32607    const NAME: &'static str = "WHEEL_DISTANCE";
32608    const EXTRA_CRC: u8 = 113u8;
32609    const ENCODED_LEN: usize = 137usize;
32610    fn deser(
32611        _version: MavlinkVersion,
32612        __input: &[u8],
32613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32614        let avail_len = __input.len();
32615        let mut payload_buf = [0; Self::ENCODED_LEN];
32616        let mut buf = if avail_len < Self::ENCODED_LEN {
32617            payload_buf[0..avail_len].copy_from_slice(__input);
32618            Bytes::new(&payload_buf)
32619        } else {
32620            Bytes::new(__input)
32621        };
32622        let mut __struct = Self::default();
32623        __struct.time_usec = buf.get_u64_le();
32624        for v in &mut __struct.distance {
32625            let val = buf.get_f64_le();
32626            *v = val;
32627        }
32628        __struct.count = buf.get_u8();
32629        Ok(__struct)
32630    }
32631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32632        let mut __tmp = BytesMut::new(bytes);
32633        #[allow(clippy::absurd_extreme_comparisons)]
32634        #[allow(unused_comparisons)]
32635        if __tmp.remaining() < Self::ENCODED_LEN {
32636            panic!(
32637                "buffer is too small (need {} bytes, but got {})",
32638                Self::ENCODED_LEN,
32639                __tmp.remaining(),
32640            )
32641        }
32642        __tmp.put_u64_le(self.time_usec);
32643        for val in &self.distance {
32644            __tmp.put_f64_le(*val);
32645        }
32646        __tmp.put_u8(self.count);
32647        if matches!(version, MavlinkVersion::V2) {
32648            let len = __tmp.len();
32649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32650        } else {
32651            __tmp.len()
32652        }
32653    }
32654}
32655#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32656#[doc = ""]
32657#[doc = "ID: 299"]
32658#[derive(Debug, Clone, PartialEq)]
32659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32661#[cfg_attr(feature = "ts", derive(TS))]
32662#[cfg_attr(feature = "ts", ts(export))]
32663pub struct WIFI_CONFIG_AP_DATA {
32664    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32665    #[cfg_attr(feature = "ts", ts(type = "string"))]
32666    pub ssid: CharArray<32>,
32667    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32668    #[cfg_attr(feature = "ts", ts(type = "string"))]
32669    pub password: CharArray<64>,
32670    #[doc = "WiFi Mode."]
32671    #[cfg_attr(feature = "serde", serde(default))]
32672    pub mode: WifiConfigApMode,
32673    #[doc = "Message acceptance response (sent back to GS)."]
32674    #[cfg_attr(feature = "serde", serde(default))]
32675    pub response: WifiConfigApResponse,
32676}
32677impl WIFI_CONFIG_AP_DATA {
32678    pub const ENCODED_LEN: usize = 98usize;
32679    pub const DEFAULT: Self = Self {
32680        ssid: CharArray::new([0_u8; 32usize]),
32681        password: CharArray::new([0_u8; 64usize]),
32682        mode: WifiConfigApMode::DEFAULT,
32683        response: WifiConfigApResponse::DEFAULT,
32684    };
32685    #[cfg(feature = "arbitrary")]
32686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32687        use arbitrary::{Arbitrary, Unstructured};
32688        let mut buf = [0u8; 1024];
32689        rng.fill_bytes(&mut buf);
32690        let mut unstructured = Unstructured::new(&buf);
32691        Self::arbitrary(&mut unstructured).unwrap_or_default()
32692    }
32693}
32694impl Default for WIFI_CONFIG_AP_DATA {
32695    fn default() -> Self {
32696        Self::DEFAULT.clone()
32697    }
32698}
32699impl MessageData for WIFI_CONFIG_AP_DATA {
32700    type Message = MavMessage;
32701    const ID: u32 = 299u32;
32702    const NAME: &'static str = "WIFI_CONFIG_AP";
32703    const EXTRA_CRC: u8 = 19u8;
32704    const ENCODED_LEN: usize = 98usize;
32705    fn deser(
32706        _version: MavlinkVersion,
32707        __input: &[u8],
32708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32709        let avail_len = __input.len();
32710        let mut payload_buf = [0; Self::ENCODED_LEN];
32711        let mut buf = if avail_len < Self::ENCODED_LEN {
32712            payload_buf[0..avail_len].copy_from_slice(__input);
32713            Bytes::new(&payload_buf)
32714        } else {
32715            Bytes::new(__input)
32716        };
32717        let mut __struct = Self::default();
32718        let mut tmp = [0_u8; 32usize];
32719        for v in &mut tmp {
32720            *v = buf.get_u8();
32721        }
32722        __struct.ssid = CharArray::new(tmp);
32723        let mut tmp = [0_u8; 64usize];
32724        for v in &mut tmp {
32725            *v = buf.get_u8();
32726        }
32727        __struct.password = CharArray::new(tmp);
32728        let tmp = buf.get_i8();
32729        __struct.mode =
32730            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32731                enum_type: "WifiConfigApMode",
32732                value: tmp as u64,
32733            })?;
32734        let tmp = buf.get_i8();
32735        __struct.response =
32736            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32737                enum_type: "WifiConfigApResponse",
32738                value: tmp as u64,
32739            })?;
32740        Ok(__struct)
32741    }
32742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32743        let mut __tmp = BytesMut::new(bytes);
32744        #[allow(clippy::absurd_extreme_comparisons)]
32745        #[allow(unused_comparisons)]
32746        if __tmp.remaining() < Self::ENCODED_LEN {
32747            panic!(
32748                "buffer is too small (need {} bytes, but got {})",
32749                Self::ENCODED_LEN,
32750                __tmp.remaining(),
32751            )
32752        }
32753        for val in &self.ssid {
32754            __tmp.put_u8(*val);
32755        }
32756        for val in &self.password {
32757            __tmp.put_u8(*val);
32758        }
32759        if matches!(version, MavlinkVersion::V2) {
32760            __tmp.put_i8(self.mode as i8);
32761            __tmp.put_i8(self.response as i8);
32762            let len = __tmp.len();
32763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32764        } else {
32765            __tmp.len()
32766        }
32767    }
32768}
32769#[doc = "Winch status."]
32770#[doc = ""]
32771#[doc = "ID: 9005"]
32772#[derive(Debug, Clone, PartialEq)]
32773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32775#[cfg_attr(feature = "ts", derive(TS))]
32776#[cfg_attr(feature = "ts", ts(export))]
32777pub struct WINCH_STATUS_DATA {
32778    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32779    pub time_usec: u64,
32780    #[doc = "Length of line released. NaN if unknown"]
32781    pub line_length: f32,
32782    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32783    pub speed: f32,
32784    #[doc = "Tension on the line. NaN if unknown"]
32785    pub tension: f32,
32786    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32787    pub voltage: f32,
32788    #[doc = "Current draw from the winch. NaN if unknown"]
32789    pub current: f32,
32790    #[doc = "Status flags"]
32791    pub status: MavWinchStatusFlag,
32792    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32793    pub temperature: i16,
32794}
32795impl WINCH_STATUS_DATA {
32796    pub const ENCODED_LEN: usize = 34usize;
32797    pub const DEFAULT: Self = Self {
32798        time_usec: 0_u64,
32799        line_length: 0.0_f32,
32800        speed: 0.0_f32,
32801        tension: 0.0_f32,
32802        voltage: 0.0_f32,
32803        current: 0.0_f32,
32804        status: MavWinchStatusFlag::DEFAULT,
32805        temperature: 0_i16,
32806    };
32807    #[cfg(feature = "arbitrary")]
32808    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32809        use arbitrary::{Arbitrary, Unstructured};
32810        let mut buf = [0u8; 1024];
32811        rng.fill_bytes(&mut buf);
32812        let mut unstructured = Unstructured::new(&buf);
32813        Self::arbitrary(&mut unstructured).unwrap_or_default()
32814    }
32815}
32816impl Default for WINCH_STATUS_DATA {
32817    fn default() -> Self {
32818        Self::DEFAULT.clone()
32819    }
32820}
32821impl MessageData for WINCH_STATUS_DATA {
32822    type Message = MavMessage;
32823    const ID: u32 = 9005u32;
32824    const NAME: &'static str = "WINCH_STATUS";
32825    const EXTRA_CRC: u8 = 117u8;
32826    const ENCODED_LEN: usize = 34usize;
32827    fn deser(
32828        _version: MavlinkVersion,
32829        __input: &[u8],
32830    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32831        let avail_len = __input.len();
32832        let mut payload_buf = [0; Self::ENCODED_LEN];
32833        let mut buf = if avail_len < Self::ENCODED_LEN {
32834            payload_buf[0..avail_len].copy_from_slice(__input);
32835            Bytes::new(&payload_buf)
32836        } else {
32837            Bytes::new(__input)
32838        };
32839        let mut __struct = Self::default();
32840        __struct.time_usec = buf.get_u64_le();
32841        __struct.line_length = buf.get_f32_le();
32842        __struct.speed = buf.get_f32_le();
32843        __struct.tension = buf.get_f32_le();
32844        __struct.voltage = buf.get_f32_le();
32845        __struct.current = buf.get_f32_le();
32846        let tmp = buf.get_u32_le();
32847        __struct.status = MavWinchStatusFlag::from_bits(tmp).ok_or(
32848            ::mavlink_core::error::ParserError::InvalidFlag {
32849                flag_type: "MavWinchStatusFlag",
32850                value: tmp as u64,
32851            },
32852        )?;
32853        __struct.temperature = buf.get_i16_le();
32854        Ok(__struct)
32855    }
32856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32857        let mut __tmp = BytesMut::new(bytes);
32858        #[allow(clippy::absurd_extreme_comparisons)]
32859        #[allow(unused_comparisons)]
32860        if __tmp.remaining() < Self::ENCODED_LEN {
32861            panic!(
32862                "buffer is too small (need {} bytes, but got {})",
32863                Self::ENCODED_LEN,
32864                __tmp.remaining(),
32865            )
32866        }
32867        __tmp.put_u64_le(self.time_usec);
32868        __tmp.put_f32_le(self.line_length);
32869        __tmp.put_f32_le(self.speed);
32870        __tmp.put_f32_le(self.tension);
32871        __tmp.put_f32_le(self.voltage);
32872        __tmp.put_f32_le(self.current);
32873        __tmp.put_u32_le(self.status.bits());
32874        __tmp.put_i16_le(self.temperature);
32875        if matches!(version, MavlinkVersion::V2) {
32876            let len = __tmp.len();
32877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32878        } else {
32879            __tmp.len()
32880        }
32881    }
32882}
32883#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32884#[doc = ""]
32885#[doc = "ID: 231"]
32886#[derive(Debug, Clone, PartialEq)]
32887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32889#[cfg_attr(feature = "ts", derive(TS))]
32890#[cfg_attr(feature = "ts", ts(export))]
32891pub struct WIND_COV_DATA {
32892    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32893    pub time_usec: u64,
32894    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32895    pub wind_x: f32,
32896    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32897    pub wind_y: f32,
32898    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32899    pub wind_z: f32,
32900    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32901    pub var_horiz: f32,
32902    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32903    pub var_vert: f32,
32904    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32905    pub wind_alt: f32,
32906    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32907    pub horiz_accuracy: f32,
32908    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32909    pub vert_accuracy: f32,
32910}
32911impl WIND_COV_DATA {
32912    pub const ENCODED_LEN: usize = 40usize;
32913    pub const DEFAULT: Self = Self {
32914        time_usec: 0_u64,
32915        wind_x: 0.0_f32,
32916        wind_y: 0.0_f32,
32917        wind_z: 0.0_f32,
32918        var_horiz: 0.0_f32,
32919        var_vert: 0.0_f32,
32920        wind_alt: 0.0_f32,
32921        horiz_accuracy: 0.0_f32,
32922        vert_accuracy: 0.0_f32,
32923    };
32924    #[cfg(feature = "arbitrary")]
32925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32926        use arbitrary::{Arbitrary, Unstructured};
32927        let mut buf = [0u8; 1024];
32928        rng.fill_bytes(&mut buf);
32929        let mut unstructured = Unstructured::new(&buf);
32930        Self::arbitrary(&mut unstructured).unwrap_or_default()
32931    }
32932}
32933impl Default for WIND_COV_DATA {
32934    fn default() -> Self {
32935        Self::DEFAULT.clone()
32936    }
32937}
32938impl MessageData for WIND_COV_DATA {
32939    type Message = MavMessage;
32940    const ID: u32 = 231u32;
32941    const NAME: &'static str = "WIND_COV";
32942    const EXTRA_CRC: u8 = 105u8;
32943    const ENCODED_LEN: usize = 40usize;
32944    fn deser(
32945        _version: MavlinkVersion,
32946        __input: &[u8],
32947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32948        let avail_len = __input.len();
32949        let mut payload_buf = [0; Self::ENCODED_LEN];
32950        let mut buf = if avail_len < Self::ENCODED_LEN {
32951            payload_buf[0..avail_len].copy_from_slice(__input);
32952            Bytes::new(&payload_buf)
32953        } else {
32954            Bytes::new(__input)
32955        };
32956        let mut __struct = Self::default();
32957        __struct.time_usec = buf.get_u64_le();
32958        __struct.wind_x = buf.get_f32_le();
32959        __struct.wind_y = buf.get_f32_le();
32960        __struct.wind_z = buf.get_f32_le();
32961        __struct.var_horiz = buf.get_f32_le();
32962        __struct.var_vert = buf.get_f32_le();
32963        __struct.wind_alt = buf.get_f32_le();
32964        __struct.horiz_accuracy = buf.get_f32_le();
32965        __struct.vert_accuracy = buf.get_f32_le();
32966        Ok(__struct)
32967    }
32968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32969        let mut __tmp = BytesMut::new(bytes);
32970        #[allow(clippy::absurd_extreme_comparisons)]
32971        #[allow(unused_comparisons)]
32972        if __tmp.remaining() < Self::ENCODED_LEN {
32973            panic!(
32974                "buffer is too small (need {} bytes, but got {})",
32975                Self::ENCODED_LEN,
32976                __tmp.remaining(),
32977            )
32978        }
32979        __tmp.put_u64_le(self.time_usec);
32980        __tmp.put_f32_le(self.wind_x);
32981        __tmp.put_f32_le(self.wind_y);
32982        __tmp.put_f32_le(self.wind_z);
32983        __tmp.put_f32_le(self.var_horiz);
32984        __tmp.put_f32_le(self.var_vert);
32985        __tmp.put_f32_le(self.wind_alt);
32986        __tmp.put_f32_le(self.horiz_accuracy);
32987        __tmp.put_f32_le(self.vert_accuracy);
32988        if matches!(version, MavlinkVersion::V2) {
32989            let len = __tmp.len();
32990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32991        } else {
32992            __tmp.len()
32993        }
32994    }
32995}
32996#[derive(Clone, PartialEq, Debug)]
32997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32998#[cfg_attr(feature = "serde", serde(tag = "type"))]
32999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33000#[cfg_attr(feature = "ts", derive(TS))]
33001#[cfg_attr(feature = "ts", ts(export))]
33002#[repr(u32)]
33003pub enum MavMessage {
33004    #[doc = "Set the vehicle attitude and body angular rates."]
33005    #[doc = ""]
33006    #[doc = "ID: 140"]
33007    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33008    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33009    #[doc = ""]
33010    #[doc = "ID: 375"]
33011    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33012    #[doc = "The location and information of an ADSB vehicle."]
33013    #[doc = ""]
33014    #[doc = "ID: 246"]
33015    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33016    #[doc = "The location and information of an AIS vessel."]
33017    #[doc = ""]
33018    #[doc = "ID: 301"]
33019    AIS_VESSEL(AIS_VESSEL_DATA),
33020    #[doc = "The current system altitude."]
33021    #[doc = ""]
33022    #[doc = "ID: 141"]
33023    ALTITUDE(ALTITUDE_DATA),
33024    #[doc = "Array test #0."]
33025    #[doc = ""]
33026    #[doc = "ID: 17150"]
33027    ARRAY_TEST_0(ARRAY_TEST_0_DATA),
33028    #[doc = "Array test #1."]
33029    #[doc = ""]
33030    #[doc = "ID: 17151"]
33031    ARRAY_TEST_1(ARRAY_TEST_1_DATA),
33032    #[doc = "Array test #3."]
33033    #[doc = ""]
33034    #[doc = "ID: 17153"]
33035    ARRAY_TEST_3(ARRAY_TEST_3_DATA),
33036    #[doc = "Array test #4."]
33037    #[doc = ""]
33038    #[doc = "ID: 17154"]
33039    ARRAY_TEST_4(ARRAY_TEST_4_DATA),
33040    #[doc = "Array test #5."]
33041    #[doc = ""]
33042    #[doc = "ID: 17155"]
33043    ARRAY_TEST_5(ARRAY_TEST_5_DATA),
33044    #[doc = "Array test #6."]
33045    #[doc = ""]
33046    #[doc = "ID: 17156"]
33047    ARRAY_TEST_6(ARRAY_TEST_6_DATA),
33048    #[doc = "Array test #7."]
33049    #[doc = ""]
33050    #[doc = "ID: 17157"]
33051    ARRAY_TEST_7(ARRAY_TEST_7_DATA),
33052    #[doc = "Array test #8."]
33053    #[doc = ""]
33054    #[doc = "ID: 17158"]
33055    ARRAY_TEST_8(ARRAY_TEST_8_DATA),
33056    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33057    #[doc = ""]
33058    #[doc = "ID: 30"]
33059    ATTITUDE(ATTITUDE_DATA),
33060    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33061    #[doc = ""]
33062    #[doc = "ID: 31"]
33063    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33064    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33065    #[doc = ""]
33066    #[doc = "ID: 61"]
33067    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33068    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33069    #[doc = ""]
33070    #[doc = "ID: 83"]
33071    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33072    #[doc = "Motion capture attitude and position."]
33073    #[doc = ""]
33074    #[doc = "ID: 138"]
33075    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33076    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33077    #[doc = ""]
33078    #[doc = "ID: 7"]
33079    AUTH_KEY(AUTH_KEY_DATA),
33080    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33081    #[doc = ""]
33082    #[doc = "ID: 286"]
33083    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33084    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33085    #[doc = ""]
33086    #[doc = "ID: 148"]
33087    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33088    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33089    #[doc = ""]
33090    #[doc = "ID: 435"]
33091    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33092    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33093    #[doc = ""]
33094    #[doc = "ID: 437"]
33095    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33096    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33097    #[doc = ""]
33098    #[doc = "ID: 372"]
33099    BATTERY_INFO(BATTERY_INFO_DATA),
33100    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33101    #[doc = ""]
33102    #[doc = "ID: 147"]
33103    BATTERY_STATUS(BATTERY_STATUS_DATA),
33104    #[doc = "Report button state change."]
33105    #[doc = ""]
33106    #[doc = "ID: 257"]
33107    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33108    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33109    #[doc = ""]
33110    #[doc = "ID: 262"]
33111    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33112    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33113    #[doc = ""]
33114    #[doc = "ID: 271"]
33115    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33116    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33117    #[doc = ""]
33118    #[doc = "ID: 263"]
33119    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33120    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33121    #[doc = ""]
33122    #[doc = "ID: 259"]
33123    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33124    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33125    #[doc = ""]
33126    #[doc = "ID: 260"]
33127    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33128    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33129    #[doc = ""]
33130    #[doc = "ID: 277"]
33131    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33132    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33133    #[doc = ""]
33134    #[doc = "ID: 276"]
33135    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33136    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33137    #[doc = ""]
33138    #[doc = "ID: 275"]
33139    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33140    #[doc = "Camera-IMU triggering and synchronisation message."]
33141    #[doc = ""]
33142    #[doc = "ID: 112"]
33143    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33144    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33145    #[doc = ""]
33146    #[doc = "ID: 387"]
33147    CANFD_FRAME(CANFD_FRAME_DATA),
33148    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33149    #[doc = ""]
33150    #[doc = "ID: 388"]
33151    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33152    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33153    #[doc = ""]
33154    #[doc = "ID: 386"]
33155    CAN_FRAME(CAN_FRAME_DATA),
33156    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33157    #[doc = ""]
33158    #[doc = "ID: 336"]
33159    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33160    #[doc = "Report current used cellular network status."]
33161    #[doc = ""]
33162    #[doc = "ID: 334"]
33163    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33164    #[doc = "Request to control this MAV."]
33165    #[doc = ""]
33166    #[doc = "ID: 5"]
33167    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33168    #[doc = "Accept / deny control of this MAV."]
33169    #[doc = ""]
33170    #[doc = "ID: 6"]
33171    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33172    #[doc = "Information about a potential collision."]
33173    #[doc = ""]
33174    #[doc = "ID: 247"]
33175    COLLISION(COLLISION_DATA),
33176    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33177    #[doc = ""]
33178    #[doc = "ID: 77"]
33179    COMMAND_ACK(COMMAND_ACK_DATA),
33180    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33181    #[doc = ""]
33182    #[doc = "ID: 80"]
33183    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33184    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33185    #[doc = ""]
33186    #[doc = "ID: 75"]
33187    COMMAND_INT(COMMAND_INT_DATA),
33188    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33189    #[doc = ""]
33190    #[doc = "ID: 76"]
33191    COMMAND_LONG(COMMAND_LONG_DATA),
33192    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33193    #[doc = ""]
33194    #[doc = "ID: 395"]
33195    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33196    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33197    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33198    #[doc = ""]
33199    #[doc = "ID: 396"]
33200    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33201    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33202    #[doc = ""]
33203    #[doc = "ID: 397"]
33204    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33205    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33206    #[doc = ""]
33207    #[doc = "ID: 146"]
33208    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33209    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33210    #[doc = ""]
33211    #[doc = "ID: 411"]
33212    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33213    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33214    #[doc = ""]
33215    #[doc = "ID: 436"]
33216    CURRENT_MODE(CURRENT_MODE_DATA),
33217    #[doc = "Data stream status information."]
33218    #[doc = ""]
33219    #[doc = "ID: 67"]
33220    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33221    DATA_STREAM(DATA_STREAM_DATA),
33222    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33223    #[doc = ""]
33224    #[doc = "ID: 130"]
33225    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33226    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33227    #[doc = ""]
33228    #[doc = "ID: 254"]
33229    DEBUG(DEBUG_DATA),
33230    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33231    #[doc = ""]
33232    #[doc = "ID: 350"]
33233    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33234    #[doc = "To debug something using a named 3D vector."]
33235    #[doc = ""]
33236    #[doc = "ID: 250"]
33237    DEBUG_VECT(DEBUG_VECT_DATA),
33238    #[doc = "Distance sensor information for an onboard rangefinder."]
33239    #[doc = ""]
33240    #[doc = "ID: 132"]
33241    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33242    #[doc = "EFI status output."]
33243    #[doc = ""]
33244    #[doc = "ID: 225"]
33245    EFI_STATUS(EFI_STATUS_DATA),
33246    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33247    #[doc = ""]
33248    #[doc = "ID: 131"]
33249    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33250    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33251    #[doc = ""]
33252    #[doc = "ID: 290"]
33253    ESC_INFO(ESC_INFO_DATA),
33254    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33255    #[doc = ""]
33256    #[doc = "ID: 291"]
33257    ESC_STATUS(ESC_STATUS_DATA),
33258    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33259    #[doc = ""]
33260    #[doc = "ID: 230"]
33261    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33262    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33263    #[doc = ""]
33264    #[doc = "ID: 410"]
33265    EVENT(EVENT_DATA),
33266    #[doc = "Provides state for additional features."]
33267    #[doc = ""]
33268    #[doc = "ID: 245"]
33269    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33270    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33271    #[doc = ""]
33272    #[doc = "ID: 162"]
33273    FENCE_STATUS(FENCE_STATUS_DATA),
33274    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33275    #[doc = ""]
33276    #[doc = "ID: 110"]
33277    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33278    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33279    #[doc = ""]
33280    #[doc = "ID: 264"]
33281    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33282    #[doc = "Current motion information from a designated system."]
33283    #[doc = ""]
33284    #[doc = "ID: 144"]
33285    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33286    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33287    #[doc = ""]
33288    #[doc = "ID: 371"]
33289    FUEL_STATUS(FUEL_STATUS_DATA),
33290    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33291    #[doc = ""]
33292    #[doc = "ID: 373"]
33293    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33294    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33295    #[doc = ""]
33296    #[doc = "ID: 285"]
33297    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33298    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33299    #[doc = ""]
33300    #[doc = "ID: 283"]
33301    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33302    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33303    #[doc = ""]
33304    #[doc = "ID: 284"]
33305    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33306    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33307    #[doc = ""]
33308    #[doc = "ID: 280"]
33309    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33310    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33311    #[doc = ""]
33312    #[doc = "ID: 282"]
33313    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33314    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33315    #[doc = ""]
33316    #[doc = "ID: 288"]
33317    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33318    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33319    #[doc = ""]
33320    #[doc = "ID: 287"]
33321    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33322    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33323    #[doc = ""]
33324    #[doc = "ID: 281"]
33325    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33326    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33327    #[doc = ""]
33328    #[doc = "ID: 33"]
33329    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33330    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33331    #[doc = ""]
33332    #[doc = "ID: 63"]
33333    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33334    #[doc = "Global position/attitude estimate from a vision source."]
33335    #[doc = ""]
33336    #[doc = "ID: 101"]
33337    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33338    #[doc = "Second GPS data."]
33339    #[doc = ""]
33340    #[doc = "ID: 124"]
33341    GPS2_RAW(GPS2_RAW_DATA),
33342    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33343    #[doc = ""]
33344    #[doc = "ID: 128"]
33345    GPS2_RTK(GPS2_RTK_DATA),
33346    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33347    #[doc = ""]
33348    #[doc = "ID: 49"]
33349    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33350    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33351    #[doc = ""]
33352    #[doc = "ID: 123"]
33353    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33354    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33355    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33356    #[doc = ""]
33357    #[doc = "ID: 232"]
33358    GPS_INPUT(GPS_INPUT_DATA),
33359    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33360    #[doc = ""]
33361    #[doc = "ID: 24"]
33362    GPS_RAW_INT(GPS_RAW_INT_DATA),
33363    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33364    #[doc = ""]
33365    #[doc = "ID: 233"]
33366    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33367    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33368    #[doc = ""]
33369    #[doc = "ID: 127"]
33370    GPS_RTK(GPS_RTK_DATA),
33371    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33372    #[doc = ""]
33373    #[doc = "ID: 25"]
33374    GPS_STATUS(GPS_STATUS_DATA),
33375    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
33376    #[doc = ""]
33377    #[doc = "ID: 0"]
33378    HEARTBEAT(HEARTBEAT_DATA),
33379    #[doc = "The IMU readings in SI units in NED body frame."]
33380    #[doc = ""]
33381    #[doc = "ID: 105"]
33382    HIGHRES_IMU(HIGHRES_IMU_DATA),
33383    #[doc = "Message appropriate for high latency connections like Iridium."]
33384    #[doc = ""]
33385    #[doc = "ID: 234"]
33386    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33387    HIGH_LATENCY(HIGH_LATENCY_DATA),
33388    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
33389    #[doc = ""]
33390    #[doc = "ID: 235"]
33391    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33392    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
33393    #[doc = ""]
33394    #[doc = "ID: 93"]
33395    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33396    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
33397    #[doc = ""]
33398    #[doc = "ID: 91"]
33399    HIL_CONTROLS(HIL_CONTROLS_DATA),
33400    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33401    #[doc = ""]
33402    #[doc = "ID: 113"]
33403    HIL_GPS(HIL_GPS_DATA),
33404    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
33405    #[doc = ""]
33406    #[doc = "ID: 114"]
33407    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33408    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
33409    #[doc = ""]
33410    #[doc = "ID: 92"]
33411    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33412    #[doc = "The IMU readings in SI units in NED body frame."]
33413    #[doc = ""]
33414    #[doc = "ID: 107"]
33415    HIL_SENSOR(HIL_SENSOR_DATA),
33416    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33417    #[doc = ""]
33418    #[doc = "ID: 90"]
33419    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33420    HIL_STATE(HIL_STATE_DATA),
33421    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33422    #[doc = ""]
33423    #[doc = "ID: 115"]
33424    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33425    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33426    #[doc = ""]
33427    #[doc = "ID: 242"]
33428    HOME_POSITION(HOME_POSITION_DATA),
33429    #[doc = "Temperature and humidity from hygrometer."]
33430    #[doc = ""]
33431    #[doc = "ID: 12920"]
33432    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33433    #[doc = "Illuminator status."]
33434    #[doc = ""]
33435    #[doc = "ID: 440"]
33436    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33437    #[doc = "Status of the Iridium SBD link."]
33438    #[doc = ""]
33439    #[doc = "ID: 335"]
33440    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33441    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33442    #[doc = ""]
33443    #[doc = "ID: 149"]
33444    LANDING_TARGET(LANDING_TARGET_DATA),
33445    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33446    #[doc = ""]
33447    #[doc = "ID: 8"]
33448    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33449    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33450    #[doc = ""]
33451    #[doc = "ID: 32"]
33452    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33453    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33454    #[doc = ""]
33455    #[doc = "ID: 64"]
33456    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33457    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33458    #[doc = ""]
33459    #[doc = "ID: 89"]
33460    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33461    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33462    #[doc = ""]
33463    #[doc = "ID: 268"]
33464    LOGGING_ACK(LOGGING_ACK_DATA),
33465    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33466    #[doc = ""]
33467    #[doc = "ID: 266"]
33468    LOGGING_DATA(LOGGING_DATA_DATA),
33469    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33470    #[doc = ""]
33471    #[doc = "ID: 267"]
33472    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33473    #[doc = "Reply to LOG_REQUEST_DATA."]
33474    #[doc = ""]
33475    #[doc = "ID: 120"]
33476    LOG_DATA(LOG_DATA_DATA),
33477    #[doc = "Reply to LOG_REQUEST_LIST."]
33478    #[doc = ""]
33479    #[doc = "ID: 118"]
33480    LOG_ENTRY(LOG_ENTRY_DATA),
33481    #[doc = "Erase all logs."]
33482    #[doc = ""]
33483    #[doc = "ID: 121"]
33484    LOG_ERASE(LOG_ERASE_DATA),
33485    #[doc = "Request a chunk of a log."]
33486    #[doc = ""]
33487    #[doc = "ID: 119"]
33488    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33489    #[doc = "Stop log transfer and resume normal logging."]
33490    #[doc = ""]
33491    #[doc = "ID: 122"]
33492    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33493    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33494    #[doc = ""]
33495    #[doc = "ID: 117"]
33496    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33497    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33498    #[doc = ""]
33499    #[doc = "ID: 192"]
33500    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33501    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33502    #[doc = ""]
33503    #[doc = "ID: 69"]
33504    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33505    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33506    #[doc = ""]
33507    #[doc = "ID: 81"]
33508    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33509    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33510    #[doc = ""]
33511    #[doc = "ID: 249"]
33512    MEMORY_VECT(MEMORY_VECT_DATA),
33513    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33514    #[doc = ""]
33515    #[doc = "ID: 244"]
33516    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33517    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33518    #[doc = ""]
33519    #[doc = "ID: 47"]
33520    MISSION_ACK(MISSION_ACK_DATA),
33521    #[doc = "Delete all mission items at once."]
33522    #[doc = ""]
33523    #[doc = "ID: 45"]
33524    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33525    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33526    #[doc = ""]
33527    #[doc = "ID: 44"]
33528    MISSION_COUNT(MISSION_COUNT_DATA),
33529    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33530    #[doc = ""]
33531    #[doc = "ID: 42"]
33532    MISSION_CURRENT(MISSION_CURRENT_DATA),
33533    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33534    #[doc = ""]
33535    #[doc = "ID: 39"]
33536    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33537    MISSION_ITEM(MISSION_ITEM_DATA),
33538    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33539    #[doc = ""]
33540    #[doc = "ID: 73"]
33541    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33542    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33543    #[doc = ""]
33544    #[doc = "ID: 46"]
33545    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33546    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33547    #[doc = ""]
33548    #[doc = "ID: 40"]
33549    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33550    MISSION_REQUEST(MISSION_REQUEST_DATA),
33551    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33552    #[doc = ""]
33553    #[doc = "ID: 51"]
33554    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33555    #[doc = "Request the overall list of mission items from the system/component."]
33556    #[doc = ""]
33557    #[doc = "ID: 43"]
33558    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33559    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33560    #[doc = ""]
33561    #[doc = "ID: 37"]
33562    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33563    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33564    #[doc = ""]
33565    #[doc = "ID: 41"]
33566    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33567    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33568    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33569    #[doc = ""]
33570    #[doc = "ID: 38"]
33571    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33572    #[doc = "Orientation of a mount."]
33573    #[doc = ""]
33574    #[doc = "ID: 265"]
33575    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33576    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33577    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33578    #[doc = ""]
33579    #[doc = "ID: 251"]
33580    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33581    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33582    #[doc = ""]
33583    #[doc = "ID: 252"]
33584    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33585    #[doc = "The state of the navigation and position controller."]
33586    #[doc = ""]
33587    #[doc = "ID: 62"]
33588    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33589    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33590    #[doc = ""]
33591    #[doc = "ID: 330"]
33592    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33593    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33594    #[doc = ""]
33595    #[doc = "ID: 331"]
33596    ODOMETRY(ODOMETRY_DATA),
33597    #[doc = "Hardware status sent by an onboard computer."]
33598    #[doc = ""]
33599    #[doc = "ID: 390"]
33600    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33601    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33602    #[doc = ""]
33603    #[doc = "ID: 12918"]
33604    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33605    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33606    #[doc = ""]
33607    #[doc = "ID: 12902"]
33608    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33609    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33610    #[doc = ""]
33611    #[doc = "ID: 12900"]
33612    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33613    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33614    #[doc = ""]
33615    #[doc = "ID: 12901"]
33616    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33617    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33618    #[doc = ""]
33619    #[doc = "ID: 12915"]
33620    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33621    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33622    #[doc = ""]
33623    #[doc = "ID: 12905"]
33624    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33625    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33626    #[doc = ""]
33627    #[doc = "ID: 12903"]
33628    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33629    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33630    #[doc = ""]
33631    #[doc = "ID: 12904"]
33632    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33633    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33634    #[doc = ""]
33635    #[doc = "ID: 12919"]
33636    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33637    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33638    #[doc = ""]
33639    #[doc = "ID: 100"]
33640    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33641    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33642    #[doc = ""]
33643    #[doc = "ID: 106"]
33644    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33645    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33646    #[doc = ""]
33647    #[doc = "ID: 360"]
33648    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33649    #[doc = "Response from a PARAM_EXT_SET message."]
33650    #[doc = ""]
33651    #[doc = "ID: 324"]
33652    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33653    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33654    #[doc = ""]
33655    #[doc = "ID: 321"]
33656    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33657    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33658    #[doc = ""]
33659    #[doc = "ID: 320"]
33660    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33661    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33662    #[doc = ""]
33663    #[doc = "ID: 323"]
33664    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33665    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33666    #[doc = ""]
33667    #[doc = "ID: 322"]
33668    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33669    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33670    #[doc = ""]
33671    #[doc = "ID: 50"]
33672    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33673    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33674    #[doc = ""]
33675    #[doc = "ID: 21"]
33676    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33677    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33678    #[doc = ""]
33679    #[doc = "ID: 20"]
33680    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33681    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33682    #[doc = ""]
33683    #[doc = "ID: 23"]
33684    PARAM_SET(PARAM_SET_DATA),
33685    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33686    #[doc = ""]
33687    #[doc = "ID: 22"]
33688    PARAM_VALUE(PARAM_VALUE_DATA),
33689    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33690    #[doc = ""]
33691    #[doc = "ID: 4"]
33692    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33693    PING(PING_DATA),
33694    #[doc = "Control vehicle tone generation (buzzer)."]
33695    #[doc = ""]
33696    #[doc = "ID: 258"]
33697    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33698    PLAY_TUNE(PLAY_TUNE_DATA),
33699    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33700    #[doc = ""]
33701    #[doc = "ID: 400"]
33702    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33703    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33704    #[doc = ""]
33705    #[doc = "ID: 87"]
33706    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33707    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33708    #[doc = ""]
33709    #[doc = "ID: 85"]
33710    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33711    #[doc = "Power supply status."]
33712    #[doc = ""]
33713    #[doc = "ID: 125"]
33714    POWER_STATUS(POWER_STATUS_DATA),
33715    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33716    #[doc = ""]
33717    #[doc = "ID: 300"]
33718    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33719    #[doc = "Status generated by radio and injected into MAVLink stream."]
33720    #[doc = ""]
33721    #[doc = "ID: 109"]
33722    RADIO_STATUS(RADIO_STATUS_DATA),
33723    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33724    #[doc = ""]
33725    #[doc = "ID: 27"]
33726    RAW_IMU(RAW_IMU_DATA),
33727    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33728    #[doc = ""]
33729    #[doc = "ID: 28"]
33730    RAW_PRESSURE(RAW_PRESSURE_DATA),
33731    #[doc = "RPM sensor data message."]
33732    #[doc = ""]
33733    #[doc = "ID: 339"]
33734    RAW_RPM(RAW_RPM_DATA),
33735    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33736    #[doc = ""]
33737    #[doc = "ID: 65"]
33738    RC_CHANNELS(RC_CHANNELS_DATA),
33739    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33740    #[doc = ""]
33741    #[doc = "ID: 70"]
33742    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33743    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33744    #[doc = ""]
33745    #[doc = "ID: 35"]
33746    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33747    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33748    #[doc = ""]
33749    #[doc = "ID: 34"]
33750    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33751    #[doc = "Request a data stream."]
33752    #[doc = ""]
33753    #[doc = "ID: 66"]
33754    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33755    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33756    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33757    #[doc = ""]
33758    #[doc = "ID: 412"]
33759    REQUEST_EVENT(REQUEST_EVENT_DATA),
33760    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33761    #[doc = ""]
33762    #[doc = "ID: 142"]
33763    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33764    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33765    #[doc = ""]
33766    #[doc = "ID: 413"]
33767    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33768    #[doc = "Read out the safety zone the MAV currently assumes."]
33769    #[doc = ""]
33770    #[doc = "ID: 55"]
33771    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33772    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33773    #[doc = ""]
33774    #[doc = "ID: 54"]
33775    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33776    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33777    #[doc = ""]
33778    #[doc = "ID: 26"]
33779    SCALED_IMU(SCALED_IMU_DATA),
33780    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33781    #[doc = ""]
33782    #[doc = "ID: 116"]
33783    SCALED_IMU2(SCALED_IMU2_DATA),
33784    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33785    #[doc = ""]
33786    #[doc = "ID: 129"]
33787    SCALED_IMU3(SCALED_IMU3_DATA),
33788    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33789    #[doc = ""]
33790    #[doc = "ID: 29"]
33791    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33792    #[doc = "Barometer readings for 2nd barometer."]
33793    #[doc = ""]
33794    #[doc = "ID: 137"]
33795    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33796    #[doc = "Barometer readings for 3rd barometer."]
33797    #[doc = ""]
33798    #[doc = "ID: 143"]
33799    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33800    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33801    #[doc = ""]
33802    #[doc = "ID: 126"]
33803    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33804    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33805    #[doc = ""]
33806    #[doc = "ID: 36"]
33807    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33808    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33809    #[doc = ""]
33810    #[doc = "ID: 256"]
33811    SETUP_SIGNING(SETUP_SIGNING_DATA),
33812    #[doc = "Set the vehicle attitude and body angular rates."]
33813    #[doc = ""]
33814    #[doc = "ID: 139"]
33815    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33816    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33817    #[doc = ""]
33818    #[doc = "ID: 82"]
33819    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33820    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33821    #[doc = ""]
33822    #[doc = "ID: 48"]
33823    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33824    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33825    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33826    #[doc = ""]
33827    #[doc = "ID: 243"]
33828    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33829    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33830    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33831    #[doc = ""]
33832    #[doc = "ID: 11"]
33833    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33834    SET_MODE(SET_MODE_DATA),
33835    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33836    #[doc = ""]
33837    #[doc = "ID: 86"]
33838    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33839    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33840    #[doc = ""]
33841    #[doc = "ID: 84"]
33842    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33843    #[doc = "Status of simulation environment, if used."]
33844    #[doc = ""]
33845    #[doc = "ID: 108"]
33846    SIM_STATE(SIM_STATE_DATA),
33847    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33848    #[doc = ""]
33849    #[doc = "ID: 370"]
33850    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33851    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33852    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33853    #[doc = ""]
33854    #[doc = "ID: 253"]
33855    STATUSTEXT(STATUSTEXT_DATA),
33856    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33857    #[doc = ""]
33858    #[doc = "ID: 261"]
33859    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33860    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33861    #[doc = ""]
33862    #[doc = "ID: 401"]
33863    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33864    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33865    #[doc = ""]
33866    #[doc = "ID: 2"]
33867    SYSTEM_TIME(SYSTEM_TIME_DATA),
33868    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33869    #[doc = ""]
33870    #[doc = "ID: 1"]
33871    SYS_STATUS(SYS_STATUS_DATA),
33872    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33873    #[doc = ""]
33874    #[doc = "ID: 135"]
33875    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33876    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33877    #[doc = ""]
33878    #[doc = "ID: 134"]
33879    TERRAIN_DATA(TERRAIN_DATA_DATA),
33880    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33881    #[doc = ""]
33882    #[doc = "ID: 136"]
33883    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33884    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33885    #[doc = ""]
33886    #[doc = "ID: 133"]
33887    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33888    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33889    #[doc = ""]
33890    #[doc = "ID: 111"]
33891    TIMESYNC(TIMESYNC_DATA),
33892    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33893    #[doc = ""]
33894    #[doc = "ID: 380"]
33895    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33896    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33897    #[doc = ""]
33898    #[doc = "ID: 333"]
33899    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33900    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33901    #[doc = ""]
33902    #[doc = "ID: 332"]
33903    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33904    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33905    #[doc = ""]
33906    #[doc = "ID: 385"]
33907    TUNNEL(TUNNEL_DATA),
33908    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33909    #[doc = ""]
33910    #[doc = "ID: 311"]
33911    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33912    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33913    #[doc = ""]
33914    #[doc = "ID: 310"]
33915    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33916    #[doc = "The global position resulting from GPS and sensor fusion."]
33917    #[doc = ""]
33918    #[doc = "ID: 340"]
33919    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33920    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33921    #[doc = ""]
33922    #[doc = "ID: 248"]
33923    V2_EXTENSION(V2_EXTENSION_DATA),
33924    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33925    #[doc = ""]
33926    #[doc = "ID: 74"]
33927    VFR_HUD(VFR_HUD_DATA),
33928    #[doc = "Vibration levels and accelerometer clipping."]
33929    #[doc = ""]
33930    #[doc = "ID: 241"]
33931    VIBRATION(VIBRATION_DATA),
33932    #[doc = "Global position estimate from a Vicon motion system source."]
33933    #[doc = ""]
33934    #[doc = "ID: 104"]
33935    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33936    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33937    #[doc = ""]
33938    #[doc = "ID: 269"]
33939    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33940    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33941    #[doc = ""]
33942    #[doc = "ID: 270"]
33943    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33944    #[doc = "Local position/attitude estimate from a vision source."]
33945    #[doc = ""]
33946    #[doc = "ID: 102"]
33947    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33948    #[doc = "Speed estimate from a vision source."]
33949    #[doc = ""]
33950    #[doc = "ID: 103"]
33951    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33952    #[doc = "Cumulative distance traveled for each reported wheel."]
33953    #[doc = ""]
33954    #[doc = "ID: 9000"]
33955    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33956    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33957    #[doc = ""]
33958    #[doc = "ID: 299"]
33959    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33960    #[doc = "Winch status."]
33961    #[doc = ""]
33962    #[doc = "ID: 9005"]
33963    WINCH_STATUS(WINCH_STATUS_DATA),
33964    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33965    #[doc = ""]
33966    #[doc = "ID: 231"]
33967    WIND_COV(WIND_COV_DATA),
33968}
33969impl MavMessage {
33970    pub const fn all_ids() -> &'static [u32] {
33971        &[
33972            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33973            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33974            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33975            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33976            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33977            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33978            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33979            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33980            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33981            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33982            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33983            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33984            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33985            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33986            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33987            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33988            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33989            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33990            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33991            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33992            12915u32, 12918u32, 12919u32, 12920u32, 17150u32, 17151u32, 17153u32, 17154u32,
33993            17155u32, 17156u32, 17157u32, 17158u32,
33994        ]
33995    }
33996}
33997impl Message for MavMessage {
33998    fn parse(
33999        version: MavlinkVersion,
34000        id: u32,
34001        payload: &[u8],
34002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34003        match id {
34004            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34005                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34006                    .map(Self::ACTUATOR_CONTROL_TARGET)
34007            }
34008            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34009                .map(Self::ACTUATOR_OUTPUT_STATUS),
34010            ADSB_VEHICLE_DATA::ID => {
34011                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34012            }
34013            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34014            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34015            ARRAY_TEST_0_DATA::ID => {
34016                ARRAY_TEST_0_DATA::deser(version, payload).map(Self::ARRAY_TEST_0)
34017            }
34018            ARRAY_TEST_1_DATA::ID => {
34019                ARRAY_TEST_1_DATA::deser(version, payload).map(Self::ARRAY_TEST_1)
34020            }
34021            ARRAY_TEST_3_DATA::ID => {
34022                ARRAY_TEST_3_DATA::deser(version, payload).map(Self::ARRAY_TEST_3)
34023            }
34024            ARRAY_TEST_4_DATA::ID => {
34025                ARRAY_TEST_4_DATA::deser(version, payload).map(Self::ARRAY_TEST_4)
34026            }
34027            ARRAY_TEST_5_DATA::ID => {
34028                ARRAY_TEST_5_DATA::deser(version, payload).map(Self::ARRAY_TEST_5)
34029            }
34030            ARRAY_TEST_6_DATA::ID => {
34031                ARRAY_TEST_6_DATA::deser(version, payload).map(Self::ARRAY_TEST_6)
34032            }
34033            ARRAY_TEST_7_DATA::ID => {
34034                ARRAY_TEST_7_DATA::deser(version, payload).map(Self::ARRAY_TEST_7)
34035            }
34036            ARRAY_TEST_8_DATA::ID => {
34037                ARRAY_TEST_8_DATA::deser(version, payload).map(Self::ARRAY_TEST_8)
34038            }
34039            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34040            ATTITUDE_QUATERNION_DATA::ID => {
34041                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34042            }
34043            ATTITUDE_QUATERNION_COV_DATA::ID => {
34044                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34045                    .map(Self::ATTITUDE_QUATERNION_COV)
34046            }
34047            ATTITUDE_TARGET_DATA::ID => {
34048                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34049            }
34050            ATT_POS_MOCAP_DATA::ID => {
34051                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34052            }
34053            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34054            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34055                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34056                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34057            }
34058            AUTOPILOT_VERSION_DATA::ID => {
34059                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34060            }
34061            AVAILABLE_MODES_DATA::ID => {
34062                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34063            }
34064            AVAILABLE_MODES_MONITOR_DATA::ID => {
34065                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34066                    .map(Self::AVAILABLE_MODES_MONITOR)
34067            }
34068            BATTERY_INFO_DATA::ID => {
34069                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34070            }
34071            BATTERY_STATUS_DATA::ID => {
34072                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34073            }
34074            BUTTON_CHANGE_DATA::ID => {
34075                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34076            }
34077            CAMERA_CAPTURE_STATUS_DATA::ID => {
34078                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34079            }
34080            CAMERA_FOV_STATUS_DATA::ID => {
34081                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34082            }
34083            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34084                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34085            }
34086            CAMERA_INFORMATION_DATA::ID => {
34087                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34088            }
34089            CAMERA_SETTINGS_DATA::ID => {
34090                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34091            }
34092            CAMERA_THERMAL_RANGE_DATA::ID => {
34093                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34094            }
34095            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34096                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34097                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34098            }
34099            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34100                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34101                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34102            }
34103            CAMERA_TRIGGER_DATA::ID => {
34104                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34105            }
34106            CANFD_FRAME_DATA::ID => {
34107                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34108            }
34109            CAN_FILTER_MODIFY_DATA::ID => {
34110                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34111            }
34112            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34113            CELLULAR_CONFIG_DATA::ID => {
34114                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34115            }
34116            CELLULAR_STATUS_DATA::ID => {
34117                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34118            }
34119            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34120                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34121                    .map(Self::CHANGE_OPERATOR_CONTROL)
34122            }
34123            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34124                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34125                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34126            }
34127            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34128            COMMAND_ACK_DATA::ID => {
34129                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34130            }
34131            COMMAND_CANCEL_DATA::ID => {
34132                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34133            }
34134            COMMAND_INT_DATA::ID => {
34135                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34136            }
34137            COMMAND_LONG_DATA::ID => {
34138                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34139            }
34140            COMPONENT_INFORMATION_DATA::ID => {
34141                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34142            }
34143            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34144                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34145                    .map(Self::COMPONENT_INFORMATION_BASIC)
34146            }
34147            COMPONENT_METADATA_DATA::ID => {
34148                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34149            }
34150            CONTROL_SYSTEM_STATE_DATA::ID => {
34151                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34152            }
34153            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34154                .map(Self::CURRENT_EVENT_SEQUENCE),
34155            CURRENT_MODE_DATA::ID => {
34156                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34157            }
34158            DATA_STREAM_DATA::ID => {
34159                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34160            }
34161            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34162                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34163                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34164            }
34165            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34166            DEBUG_FLOAT_ARRAY_DATA::ID => {
34167                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34168            }
34169            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34170            DISTANCE_SENSOR_DATA::ID => {
34171                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34172            }
34173            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34174            ENCAPSULATED_DATA_DATA::ID => {
34175                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34176            }
34177            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34178            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34179            ESTIMATOR_STATUS_DATA::ID => {
34180                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34181            }
34182            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34183            EXTENDED_SYS_STATE_DATA::ID => {
34184                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34185            }
34186            FENCE_STATUS_DATA::ID => {
34187                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34188            }
34189            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34190                .map(Self::FILE_TRANSFER_PROTOCOL),
34191            FLIGHT_INFORMATION_DATA::ID => {
34192                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34193            }
34194            FOLLOW_TARGET_DATA::ID => {
34195                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34196            }
34197            FUEL_STATUS_DATA::ID => {
34198                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34199            }
34200            GENERATOR_STATUS_DATA::ID => {
34201                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34202            }
34203            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34204                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34205                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34206            }
34207            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34208                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34209                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34210            }
34211            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34212                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34213                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34214            }
34215            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34216                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34217                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34218            }
34219            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34220                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34221                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34222            }
34223            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34224                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34225                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34226            }
34227            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34228                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34229                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34230            }
34231            GIMBAL_MANAGER_STATUS_DATA::ID => {
34232                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34233            }
34234            GLOBAL_POSITION_INT_DATA::ID => {
34235                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34236            }
34237            GLOBAL_POSITION_INT_COV_DATA::ID => {
34238                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34239                    .map(Self::GLOBAL_POSITION_INT_COV)
34240            }
34241            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34242                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34243                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34244            }
34245            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34246            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34247            GPS_GLOBAL_ORIGIN_DATA::ID => {
34248                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34249            }
34250            GPS_INJECT_DATA_DATA::ID => {
34251                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34252            }
34253            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34254            GPS_RAW_INT_DATA::ID => {
34255                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34256            }
34257            GPS_RTCM_DATA_DATA::ID => {
34258                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34259            }
34260            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34261            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34262            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34263            HIGHRES_IMU_DATA::ID => {
34264                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34265            }
34266            HIGH_LATENCY_DATA::ID => {
34267                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34268            }
34269            HIGH_LATENCY2_DATA::ID => {
34270                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34271            }
34272            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34273                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34274            }
34275            HIL_CONTROLS_DATA::ID => {
34276                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34277            }
34278            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34279            HIL_OPTICAL_FLOW_DATA::ID => {
34280                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34281            }
34282            HIL_RC_INPUTS_RAW_DATA::ID => {
34283                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34284            }
34285            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34286            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34287            HIL_STATE_QUATERNION_DATA::ID => {
34288                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34289            }
34290            HOME_POSITION_DATA::ID => {
34291                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34292            }
34293            HYGROMETER_SENSOR_DATA::ID => {
34294                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34295            }
34296            ILLUMINATOR_STATUS_DATA::ID => {
34297                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34298            }
34299            ISBD_LINK_STATUS_DATA::ID => {
34300                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34301            }
34302            LANDING_TARGET_DATA::ID => {
34303                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34304            }
34305            LINK_NODE_STATUS_DATA::ID => {
34306                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34307            }
34308            LOCAL_POSITION_NED_DATA::ID => {
34309                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34310            }
34311            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34312                .map(Self::LOCAL_POSITION_NED_COV),
34313            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34314                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34315                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34316            }
34317            LOGGING_ACK_DATA::ID => {
34318                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34319            }
34320            LOGGING_DATA_DATA::ID => {
34321                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34322            }
34323            LOGGING_DATA_ACKED_DATA::ID => {
34324                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34325            }
34326            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34327            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34328            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34329            LOG_REQUEST_DATA_DATA::ID => {
34330                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34331            }
34332            LOG_REQUEST_END_DATA::ID => {
34333                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34334            }
34335            LOG_REQUEST_LIST_DATA::ID => {
34336                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34337            }
34338            MAG_CAL_REPORT_DATA::ID => {
34339                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34340            }
34341            MANUAL_CONTROL_DATA::ID => {
34342                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34343            }
34344            MANUAL_SETPOINT_DATA::ID => {
34345                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34346            }
34347            MEMORY_VECT_DATA::ID => {
34348                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34349            }
34350            MESSAGE_INTERVAL_DATA::ID => {
34351                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34352            }
34353            MISSION_ACK_DATA::ID => {
34354                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34355            }
34356            MISSION_CLEAR_ALL_DATA::ID => {
34357                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34358            }
34359            MISSION_COUNT_DATA::ID => {
34360                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34361            }
34362            MISSION_CURRENT_DATA::ID => {
34363                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34364            }
34365            MISSION_ITEM_DATA::ID => {
34366                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34367            }
34368            MISSION_ITEM_INT_DATA::ID => {
34369                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34370            }
34371            MISSION_ITEM_REACHED_DATA::ID => {
34372                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34373            }
34374            MISSION_REQUEST_DATA::ID => {
34375                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34376            }
34377            MISSION_REQUEST_INT_DATA::ID => {
34378                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34379            }
34380            MISSION_REQUEST_LIST_DATA::ID => {
34381                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34382            }
34383            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34384                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34385                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34386            }
34387            MISSION_SET_CURRENT_DATA::ID => {
34388                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34389            }
34390            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34391                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34392                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34393            }
34394            MOUNT_ORIENTATION_DATA::ID => {
34395                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34396            }
34397            NAMED_VALUE_FLOAT_DATA::ID => {
34398                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34399            }
34400            NAMED_VALUE_INT_DATA::ID => {
34401                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34402            }
34403            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34404                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34405            }
34406            OBSTACLE_DISTANCE_DATA::ID => {
34407                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34408            }
34409            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34410            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34411                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34412                    .map(Self::ONBOARD_COMPUTER_STATUS)
34413            }
34414            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34415                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34416                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34417            }
34418            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34419                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34420                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34421            }
34422            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34423                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34424            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34425                .map(Self::OPEN_DRONE_ID_LOCATION),
34426            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34427                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34428                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34429            }
34430            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34431                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34432                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34433            }
34434            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34435                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34436            }
34437            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34438                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34439            }
34440            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34441                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34442                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34443            }
34444            OPTICAL_FLOW_DATA::ID => {
34445                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34446            }
34447            OPTICAL_FLOW_RAD_DATA::ID => {
34448                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34449            }
34450            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34451                .map(Self::ORBIT_EXECUTION_STATUS),
34452            PARAM_EXT_ACK_DATA::ID => {
34453                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34454            }
34455            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34456                .map(Self::PARAM_EXT_REQUEST_LIST),
34457            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34458                .map(Self::PARAM_EXT_REQUEST_READ),
34459            PARAM_EXT_SET_DATA::ID => {
34460                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34461            }
34462            PARAM_EXT_VALUE_DATA::ID => {
34463                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34464            }
34465            PARAM_MAP_RC_DATA::ID => {
34466                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34467            }
34468            PARAM_REQUEST_LIST_DATA::ID => {
34469                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34470            }
34471            PARAM_REQUEST_READ_DATA::ID => {
34472                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34473            }
34474            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34475            PARAM_VALUE_DATA::ID => {
34476                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34477            }
34478            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34479            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34480            PLAY_TUNE_V2_DATA::ID => {
34481                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34482            }
34483            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34484                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34485                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34486            }
34487            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34488                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34489                    .map(Self::POSITION_TARGET_LOCAL_NED)
34490            }
34491            POWER_STATUS_DATA::ID => {
34492                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34493            }
34494            PROTOCOL_VERSION_DATA::ID => {
34495                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34496            }
34497            RADIO_STATUS_DATA::ID => {
34498                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34499            }
34500            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34501            RAW_PRESSURE_DATA::ID => {
34502                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34503            }
34504            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34505            RC_CHANNELS_DATA::ID => {
34506                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34507            }
34508            RC_CHANNELS_OVERRIDE_DATA::ID => {
34509                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34510            }
34511            RC_CHANNELS_RAW_DATA::ID => {
34512                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34513            }
34514            RC_CHANNELS_SCALED_DATA::ID => {
34515                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34516            }
34517            REQUEST_DATA_STREAM_DATA::ID => {
34518                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34519            }
34520            REQUEST_EVENT_DATA::ID => {
34521                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34522            }
34523            RESOURCE_REQUEST_DATA::ID => {
34524                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34525            }
34526            RESPONSE_EVENT_ERROR_DATA::ID => {
34527                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34528            }
34529            SAFETY_ALLOWED_AREA_DATA::ID => {
34530                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34531            }
34532            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34533                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34534                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34535            }
34536            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34537            SCALED_IMU2_DATA::ID => {
34538                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34539            }
34540            SCALED_IMU3_DATA::ID => {
34541                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34542            }
34543            SCALED_PRESSURE_DATA::ID => {
34544                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34545            }
34546            SCALED_PRESSURE2_DATA::ID => {
34547                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34548            }
34549            SCALED_PRESSURE3_DATA::ID => {
34550                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34551            }
34552            SERIAL_CONTROL_DATA::ID => {
34553                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34554            }
34555            SERVO_OUTPUT_RAW_DATA::ID => {
34556                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34557            }
34558            SETUP_SIGNING_DATA::ID => {
34559                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34560            }
34561            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34562                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34563                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34564            }
34565            SET_ATTITUDE_TARGET_DATA::ID => {
34566                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34567            }
34568            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34569                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34570            }
34571            SET_HOME_POSITION_DATA::ID => {
34572                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34573            }
34574            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34575            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34576                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34577                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34578            }
34579            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34580                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34581                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34582            }
34583            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34584            SMART_BATTERY_INFO_DATA::ID => {
34585                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34586            }
34587            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34588            STORAGE_INFORMATION_DATA::ID => {
34589                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34590            }
34591            SUPPORTED_TUNES_DATA::ID => {
34592                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34593            }
34594            SYSTEM_TIME_DATA::ID => {
34595                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34596            }
34597            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34598            TERRAIN_CHECK_DATA::ID => {
34599                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34600            }
34601            TERRAIN_DATA_DATA::ID => {
34602                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34603            }
34604            TERRAIN_REPORT_DATA::ID => {
34605                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34606            }
34607            TERRAIN_REQUEST_DATA::ID => {
34608                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34609            }
34610            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34611            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34612                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34613                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34614            }
34615            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34616                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34617                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34618            }
34619            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34620                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34621                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34622            }
34623            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34624            UAVCAN_NODE_INFO_DATA::ID => {
34625                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34626            }
34627            UAVCAN_NODE_STATUS_DATA::ID => {
34628                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34629            }
34630            UTM_GLOBAL_POSITION_DATA::ID => {
34631                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34632            }
34633            V2_EXTENSION_DATA::ID => {
34634                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34635            }
34636            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34637            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34638            VICON_POSITION_ESTIMATE_DATA::ID => {
34639                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34640                    .map(Self::VICON_POSITION_ESTIMATE)
34641            }
34642            VIDEO_STREAM_INFORMATION_DATA::ID => {
34643                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34644                    .map(Self::VIDEO_STREAM_INFORMATION)
34645            }
34646            VIDEO_STREAM_STATUS_DATA::ID => {
34647                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34648            }
34649            VISION_POSITION_ESTIMATE_DATA::ID => {
34650                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34651                    .map(Self::VISION_POSITION_ESTIMATE)
34652            }
34653            VISION_SPEED_ESTIMATE_DATA::ID => {
34654                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34655            }
34656            WHEEL_DISTANCE_DATA::ID => {
34657                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34658            }
34659            WIFI_CONFIG_AP_DATA::ID => {
34660                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34661            }
34662            WINCH_STATUS_DATA::ID => {
34663                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34664            }
34665            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34666            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34667        }
34668    }
34669    fn message_name(&self) -> &'static str {
34670        match self {
34671            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34672            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34673            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34674            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34675            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34676            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::NAME,
34677            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::NAME,
34678            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::NAME,
34679            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::NAME,
34680            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::NAME,
34681            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::NAME,
34682            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::NAME,
34683            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::NAME,
34684            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34685            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34686            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34687            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34688            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34689            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34690            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34691                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34692            }
34693            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34694            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34695            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34696            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34697            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34698            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34699            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34700            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34701            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34702            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34703            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34704            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34705            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34706            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34707            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34708            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34709            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34710            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34711            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34712            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34713            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34714            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34715            Self::COLLISION(..) => COLLISION_DATA::NAME,
34716            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34717            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34718            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34719            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34720            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34721            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34722            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34723            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34724            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34725            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34726            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34727            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34728            Self::DEBUG(..) => DEBUG_DATA::NAME,
34729            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34730            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34731            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34732            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34733            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34734            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34735            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34736            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34737            Self::EVENT(..) => EVENT_DATA::NAME,
34738            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34739            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34740            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34741            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34742            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34743            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34744            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34745            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34746            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34747            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34748            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34749            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34750            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34751                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34752            }
34753            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34754            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34755            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34756            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34757            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34758            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34759            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34760            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34761            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34762            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34763            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34764            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34765            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34766            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34767            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34768            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34769            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34770            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34771            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34772            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34773            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34774            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34775            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34776            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34777            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34778            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34779            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34780            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34781            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34782            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34783            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34784            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34785            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34786            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34787            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34788                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34789            }
34790            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34791            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34792            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34793            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34794            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34795            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34796            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34797            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34798            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34799            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34800            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34801            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34802            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34803            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34804            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34805            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34806            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34807            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34808            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34809            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34810            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34811            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34812            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34813            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34814            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34815            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34816            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34817            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34818            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34819            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34820            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34821            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34822            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34823            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34824            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34825            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34826            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34827            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34828            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34829            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34830            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34831            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34832            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34833            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34834            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34835            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34836            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34837            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34838            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34839            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34840            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34841            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34842            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34843            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34844            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34845            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34846            Self::PING(..) => PING_DATA::NAME,
34847            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34848            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34849            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34850            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34851            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34852            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34853            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34854            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34855            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34856            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34857            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34858            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34859            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34860            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34861            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34862            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34863            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34864            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34865            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34866            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34867            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34868            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34869            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34870            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34871            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34872            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34873            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34874            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34875            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34876            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34877            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34878            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34879            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34880            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34881            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34882            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34883            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34884            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34885            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34886            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34887            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34888            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34889            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34890            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34891            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34892            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34893            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34894            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34895            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34896            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34897                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34898            }
34899            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34900                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34901            }
34902            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34903            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34904            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34905            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34906            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34907            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34908            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34909            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34910            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34911            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34912            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34913            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34914            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34915            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34916            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34917            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34918        }
34919    }
34920    fn message_id(&self) -> u32 {
34921        match self {
34922            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34923            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34924            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34925            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34926            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34927            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::ID,
34928            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::ID,
34929            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::ID,
34930            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::ID,
34931            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::ID,
34932            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::ID,
34933            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::ID,
34934            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::ID,
34935            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34936            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34937            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34938            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34939            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34940            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34941            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34942                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34943            }
34944            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34945            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34946            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34947            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34948            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34949            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34950            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34951            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34952            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34953            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34954            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34955            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34956            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34957            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34958            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34959            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34960            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34961            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34962            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34963            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34964            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34965            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34966            Self::COLLISION(..) => COLLISION_DATA::ID,
34967            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34968            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34969            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34970            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34971            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34972            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34973            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34974            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34975            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34976            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34977            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34978            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34979            Self::DEBUG(..) => DEBUG_DATA::ID,
34980            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34981            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34982            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34983            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34984            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34985            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34986            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34987            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34988            Self::EVENT(..) => EVENT_DATA::ID,
34989            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34990            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34991            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34992            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34993            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34994            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34995            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34996            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34997            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34998            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34999            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35000            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35001            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35002                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35003            }
35004            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35005            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35006            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35007            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35008            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35009            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35010            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35011            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35012            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35013            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35014            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35015            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35016            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35017            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35018            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35019            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35020            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35021            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35022            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35023            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35024            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35025            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35026            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35027            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35028            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35029            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35030            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35031            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35032            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35033            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35034            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35035            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35036            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35037            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35038            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35039                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35040            }
35041            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35042            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35043            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35044            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35045            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35046            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35047            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35048            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35049            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35050            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35051            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35052            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35053            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35054            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35055            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35056            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35057            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35058            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35059            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35060            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35061            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35062            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35063            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35064            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35065            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35066            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35067            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35068            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35069            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35070            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35071            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35072            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35073            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35074            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35075            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35076            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35077            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35078            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35079            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35080            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35081            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35082            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35083            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35084            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35085            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35086            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35087            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35088            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35089            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35090            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35091            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35092            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35093            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35094            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35095            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35096            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35097            Self::PING(..) => PING_DATA::ID,
35098            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35099            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35100            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35101            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35102            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35103            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35104            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35105            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35106            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35107            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35108            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35109            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35110            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35111            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35112            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35113            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35114            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35115            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35116            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35117            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35118            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35119            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35120            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35121            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35122            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35123            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35124            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35125            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35126            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35127            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35128            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35129            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35130            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35131            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35132            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35133            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35134            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35135            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35136            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35137            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35138            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35139            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35140            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35141            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35142            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35143            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35144            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35145            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35146            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35147            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35148            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35149                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35150            }
35151            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35152            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35153            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35154            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35155            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35156            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35157            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35158            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35159            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35160            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35161            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35162            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35163            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35164            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35165            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35166            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35167        }
35168    }
35169    fn message_id_from_name(name: &str) -> Option<u32> {
35170        match name {
35171            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35172            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35173            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35174            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35175            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35176            ARRAY_TEST_0_DATA::NAME => Some(ARRAY_TEST_0_DATA::ID),
35177            ARRAY_TEST_1_DATA::NAME => Some(ARRAY_TEST_1_DATA::ID),
35178            ARRAY_TEST_3_DATA::NAME => Some(ARRAY_TEST_3_DATA::ID),
35179            ARRAY_TEST_4_DATA::NAME => Some(ARRAY_TEST_4_DATA::ID),
35180            ARRAY_TEST_5_DATA::NAME => Some(ARRAY_TEST_5_DATA::ID),
35181            ARRAY_TEST_6_DATA::NAME => Some(ARRAY_TEST_6_DATA::ID),
35182            ARRAY_TEST_7_DATA::NAME => Some(ARRAY_TEST_7_DATA::ID),
35183            ARRAY_TEST_8_DATA::NAME => Some(ARRAY_TEST_8_DATA::ID),
35184            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35185            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35186            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35187            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35188            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35189            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35190            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35191                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35192            }
35193            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35194            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35195            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35196            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35197            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35198            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35199            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35200            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35201            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35202            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35203            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35204            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35205            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35206            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35207            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35208            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35209            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35210            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35211            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35212            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35213            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35214            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35215            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35216            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35217            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35218            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35219            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35220            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35221            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35222            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35223            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35224            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35225            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35226            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35227            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35228            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35229            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35230            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35231            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35232            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35233            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35234            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35235            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35236            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35237            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35238            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35239            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35240            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35241            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35242            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35243            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35244            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35245            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35246                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35247            }
35248            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35249            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35250            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35251            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35252            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35253                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35254            }
35255            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35256            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35257            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35258            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35259            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35260                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35261            }
35262            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35263            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35264            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35265            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35266            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35267            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35268            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35269            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35270            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35271            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35272            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35273            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35274            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35275            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35276            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35277            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35278            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35279            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35280            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35281            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35282            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35283            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35284            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35285            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35286            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35287            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35288            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35289            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35290            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35291            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35292                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35293            }
35294            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35295            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35296            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35297            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35298            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35299            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35300            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35301            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35302            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35303            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35304            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35305            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35306            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35307            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35308            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35309            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35310            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35311            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35312            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35313            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35314            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35315            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35316            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35317            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35318            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35319            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35320            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35321            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35322            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35323            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35324            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35325            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35326            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35327            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35328            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35329            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35330            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35331            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35332            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35333            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35334            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35335            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35336            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35337            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35338            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35339            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35340            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35341            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35342            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35343            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35344            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35345            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35346            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35347            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35348            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35349            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35350            PING_DATA::NAME => Some(PING_DATA::ID),
35351            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35352            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35353            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35354            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35355            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35356            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35357            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35358            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35359            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35360            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35361            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35362            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35363            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35364            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35365            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35366            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35367            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35368            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35369            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35370            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35371            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35372            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35373            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35374            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35375            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35376            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35377            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35378            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35379            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35380            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35381            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35382            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35383            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35384            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35385            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35386                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35387            }
35388            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35389                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35390            }
35391            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35392            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35393            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35394            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35395            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35396            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35397            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35398            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35399            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35400            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35401            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35402            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35403            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35404            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35405                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35406            }
35407            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35408                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35409            }
35410            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35411            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35412            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35413            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35414            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35415            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35416            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35417            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35418            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35419            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35420            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35421            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35422            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35423            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35424            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35425            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35426            _ => None,
35427        }
35428    }
35429    fn default_message_from_id(id: u32) -> Option<Self> {
35430        match id {
35431            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35432                ACTUATOR_CONTROL_TARGET_DATA::default(),
35433            )),
35434            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35435                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35436            )),
35437            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35438            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35439            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35440            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::default())),
35441            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::default())),
35442            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::default())),
35443            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::default())),
35444            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::default())),
35445            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::default())),
35446            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::default())),
35447            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::default())),
35448            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35449            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35450                ATTITUDE_QUATERNION_DATA::default(),
35451            )),
35452            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35453                ATTITUDE_QUATERNION_COV_DATA::default(),
35454            )),
35455            ATTITUDE_TARGET_DATA::ID => {
35456                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35457            }
35458            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35459            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35460            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35461                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35462                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35463                ))
35464            }
35465            AUTOPILOT_VERSION_DATA::ID => {
35466                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35467            }
35468            AVAILABLE_MODES_DATA::ID => {
35469                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35470            }
35471            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35472                AVAILABLE_MODES_MONITOR_DATA::default(),
35473            )),
35474            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35475            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35476            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35477            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35478                CAMERA_CAPTURE_STATUS_DATA::default(),
35479            )),
35480            CAMERA_FOV_STATUS_DATA::ID => {
35481                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35482            }
35483            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35484                CAMERA_IMAGE_CAPTURED_DATA::default(),
35485            )),
35486            CAMERA_INFORMATION_DATA::ID => {
35487                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35488            }
35489            CAMERA_SETTINGS_DATA::ID => {
35490                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35491            }
35492            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35493                CAMERA_THERMAL_RANGE_DATA::default(),
35494            )),
35495            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35496                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35497            )),
35498            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35499                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35500            )),
35501            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35502            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35503            CAN_FILTER_MODIFY_DATA::ID => {
35504                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35505            }
35506            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35507            CELLULAR_CONFIG_DATA::ID => {
35508                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35509            }
35510            CELLULAR_STATUS_DATA::ID => {
35511                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35512            }
35513            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35514                CHANGE_OPERATOR_CONTROL_DATA::default(),
35515            )),
35516            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35517                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35518            )),
35519            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35520            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35521            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35522            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35523            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35524            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35525                COMPONENT_INFORMATION_DATA::default(),
35526            )),
35527            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35528                COMPONENT_INFORMATION_BASIC_DATA::default(),
35529            )),
35530            COMPONENT_METADATA_DATA::ID => {
35531                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35532            }
35533            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35534                CONTROL_SYSTEM_STATE_DATA::default(),
35535            )),
35536            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35537                CURRENT_EVENT_SEQUENCE_DATA::default(),
35538            )),
35539            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35540            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35541            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35542                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35543            )),
35544            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35545            DEBUG_FLOAT_ARRAY_DATA::ID => {
35546                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35547            }
35548            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35549            DISTANCE_SENSOR_DATA::ID => {
35550                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35551            }
35552            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35553            ENCAPSULATED_DATA_DATA::ID => {
35554                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35555            }
35556            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35557            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35558            ESTIMATOR_STATUS_DATA::ID => {
35559                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35560            }
35561            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35562            EXTENDED_SYS_STATE_DATA::ID => {
35563                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35564            }
35565            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35566            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35567                FILE_TRANSFER_PROTOCOL_DATA::default(),
35568            )),
35569            FLIGHT_INFORMATION_DATA::ID => {
35570                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35571            }
35572            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35573            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35574            GENERATOR_STATUS_DATA::ID => {
35575                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35576            }
35577            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35578                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35579            )),
35580            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35581                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35582            )),
35583            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35584                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35585            )),
35586            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35587                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35588            )),
35589            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35590                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35591            )),
35592            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35593                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35594                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35595                ))
35596            }
35597            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35598                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35599            )),
35600            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35601                GIMBAL_MANAGER_STATUS_DATA::default(),
35602            )),
35603            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35604                GLOBAL_POSITION_INT_DATA::default(),
35605            )),
35606            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35607                GLOBAL_POSITION_INT_COV_DATA::default(),
35608            )),
35609            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35610                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35611                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35612                ))
35613            }
35614            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35615            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35616            GPS_GLOBAL_ORIGIN_DATA::ID => {
35617                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35618            }
35619            GPS_INJECT_DATA_DATA::ID => {
35620                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35621            }
35622            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35623            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35624            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35625            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35626            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35627            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35628            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35629            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35630            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35631            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35632                HIL_ACTUATOR_CONTROLS_DATA::default(),
35633            )),
35634            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35635            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35636            HIL_OPTICAL_FLOW_DATA::ID => {
35637                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35638            }
35639            HIL_RC_INPUTS_RAW_DATA::ID => {
35640                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35641            }
35642            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35643            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35644            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35645                HIL_STATE_QUATERNION_DATA::default(),
35646            )),
35647            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35648            HYGROMETER_SENSOR_DATA::ID => {
35649                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35650            }
35651            ILLUMINATOR_STATUS_DATA::ID => {
35652                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35653            }
35654            ISBD_LINK_STATUS_DATA::ID => {
35655                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35656            }
35657            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35658            LINK_NODE_STATUS_DATA::ID => {
35659                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35660            }
35661            LOCAL_POSITION_NED_DATA::ID => {
35662                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35663            }
35664            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35665                LOCAL_POSITION_NED_COV_DATA::default(),
35666            )),
35667            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35668                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35669                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35670                ))
35671            }
35672            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35673            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35674            LOGGING_DATA_ACKED_DATA::ID => {
35675                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35676            }
35677            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35678            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35679            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35680            LOG_REQUEST_DATA_DATA::ID => {
35681                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35682            }
35683            LOG_REQUEST_END_DATA::ID => {
35684                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35685            }
35686            LOG_REQUEST_LIST_DATA::ID => {
35687                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35688            }
35689            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35690            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35691            MANUAL_SETPOINT_DATA::ID => {
35692                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35693            }
35694            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35695            MESSAGE_INTERVAL_DATA::ID => {
35696                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35697            }
35698            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35699            MISSION_CLEAR_ALL_DATA::ID => {
35700                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35701            }
35702            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35703            MISSION_CURRENT_DATA::ID => {
35704                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35705            }
35706            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35707            MISSION_ITEM_INT_DATA::ID => {
35708                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35709            }
35710            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35711                MISSION_ITEM_REACHED_DATA::default(),
35712            )),
35713            MISSION_REQUEST_DATA::ID => {
35714                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35715            }
35716            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35717                MISSION_REQUEST_INT_DATA::default(),
35718            )),
35719            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35720                MISSION_REQUEST_LIST_DATA::default(),
35721            )),
35722            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35723                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35724            )),
35725            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35726                MISSION_SET_CURRENT_DATA::default(),
35727            )),
35728            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35729                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35730            )),
35731            MOUNT_ORIENTATION_DATA::ID => {
35732                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35733            }
35734            NAMED_VALUE_FLOAT_DATA::ID => {
35735                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35736            }
35737            NAMED_VALUE_INT_DATA::ID => {
35738                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35739            }
35740            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35741                NAV_CONTROLLER_OUTPUT_DATA::default(),
35742            )),
35743            OBSTACLE_DISTANCE_DATA::ID => {
35744                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35745            }
35746            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35747            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35748                ONBOARD_COMPUTER_STATUS_DATA::default(),
35749            )),
35750            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35751                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35752            )),
35753            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35754                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35755            )),
35756            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35757                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35758            )),
35759            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35760                OPEN_DRONE_ID_LOCATION_DATA::default(),
35761            )),
35762            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35763                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35764            )),
35765            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35766                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35767            )),
35768            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35769                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35770            )),
35771            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35772                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35773            )),
35774            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35775                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35776            )),
35777            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35778            OPTICAL_FLOW_RAD_DATA::ID => {
35779                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35780            }
35781            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35782                ORBIT_EXECUTION_STATUS_DATA::default(),
35783            )),
35784            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35785            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35786                PARAM_EXT_REQUEST_LIST_DATA::default(),
35787            )),
35788            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35789                PARAM_EXT_REQUEST_READ_DATA::default(),
35790            )),
35791            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35792            PARAM_EXT_VALUE_DATA::ID => {
35793                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35794            }
35795            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35796            PARAM_REQUEST_LIST_DATA::ID => {
35797                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35798            }
35799            PARAM_REQUEST_READ_DATA::ID => {
35800                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35801            }
35802            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35803            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35804            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35805            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35806            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35807            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35808                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35809            )),
35810            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35811                POSITION_TARGET_LOCAL_NED_DATA::default(),
35812            )),
35813            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35814            PROTOCOL_VERSION_DATA::ID => {
35815                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35816            }
35817            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35818            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35819            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35820            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35821            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35822            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35823                RC_CHANNELS_OVERRIDE_DATA::default(),
35824            )),
35825            RC_CHANNELS_RAW_DATA::ID => {
35826                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35827            }
35828            RC_CHANNELS_SCALED_DATA::ID => {
35829                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35830            }
35831            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35832                REQUEST_DATA_STREAM_DATA::default(),
35833            )),
35834            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35835            RESOURCE_REQUEST_DATA::ID => {
35836                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35837            }
35838            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35839                RESPONSE_EVENT_ERROR_DATA::default(),
35840            )),
35841            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35842                SAFETY_ALLOWED_AREA_DATA::default(),
35843            )),
35844            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35845                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35846            )),
35847            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35848            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35849            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35850            SCALED_PRESSURE_DATA::ID => {
35851                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35852            }
35853            SCALED_PRESSURE2_DATA::ID => {
35854                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35855            }
35856            SCALED_PRESSURE3_DATA::ID => {
35857                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35858            }
35859            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35860            SERVO_OUTPUT_RAW_DATA::ID => {
35861                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35862            }
35863            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35864            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35865                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35866            )),
35867            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35868                SET_ATTITUDE_TARGET_DATA::default(),
35869            )),
35870            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35871                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35872            )),
35873            SET_HOME_POSITION_DATA::ID => {
35874                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35875            }
35876            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35877            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35878                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35879            )),
35880            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35881                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35882            )),
35883            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35884            SMART_BATTERY_INFO_DATA::ID => {
35885                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35886            }
35887            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35888            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35889                STORAGE_INFORMATION_DATA::default(),
35890            )),
35891            SUPPORTED_TUNES_DATA::ID => {
35892                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35893            }
35894            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35895            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35896            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35897            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35898            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35899            TERRAIN_REQUEST_DATA::ID => {
35900                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35901            }
35902            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35903            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35904                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35905            )),
35906            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35907                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35908                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35909                ))
35910            }
35911            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35912                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35913                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35914                ))
35915            }
35916            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35917            UAVCAN_NODE_INFO_DATA::ID => {
35918                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35919            }
35920            UAVCAN_NODE_STATUS_DATA::ID => {
35921                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35922            }
35923            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35924                UTM_GLOBAL_POSITION_DATA::default(),
35925            )),
35926            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35927            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35928            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35929            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35930                VICON_POSITION_ESTIMATE_DATA::default(),
35931            )),
35932            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35933                VIDEO_STREAM_INFORMATION_DATA::default(),
35934            )),
35935            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35936                VIDEO_STREAM_STATUS_DATA::default(),
35937            )),
35938            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35939                VISION_POSITION_ESTIMATE_DATA::default(),
35940            )),
35941            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35942                VISION_SPEED_ESTIMATE_DATA::default(),
35943            )),
35944            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35945            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35946            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35947            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35948            _ => None,
35949        }
35950    }
35951    #[cfg(feature = "arbitrary")]
35952    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35953        match id {
35954            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35955                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35956            )),
35957            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35958                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35959            )),
35960            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35961            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35962            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35963            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::random(rng))),
35964            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::random(rng))),
35965            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::random(rng))),
35966            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::random(rng))),
35967            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::random(rng))),
35968            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::random(rng))),
35969            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::random(rng))),
35970            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::random(rng))),
35971            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35972            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35973                ATTITUDE_QUATERNION_DATA::random(rng),
35974            )),
35975            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35976                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35977            )),
35978            ATTITUDE_TARGET_DATA::ID => {
35979                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35980            }
35981            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35982            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35983            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35984                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35985                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35986                ))
35987            }
35988            AUTOPILOT_VERSION_DATA::ID => {
35989                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35990            }
35991            AVAILABLE_MODES_DATA::ID => {
35992                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35993            }
35994            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35995                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35996            )),
35997            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35998            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35999            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36000            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36001                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36002            )),
36003            CAMERA_FOV_STATUS_DATA::ID => {
36004                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36005            }
36006            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36007                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36008            )),
36009            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36010                CAMERA_INFORMATION_DATA::random(rng),
36011            )),
36012            CAMERA_SETTINGS_DATA::ID => {
36013                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36014            }
36015            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36016                CAMERA_THERMAL_RANGE_DATA::random(rng),
36017            )),
36018            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36019                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36020            )),
36021            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36022                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36023            )),
36024            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36025            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36026            CAN_FILTER_MODIFY_DATA::ID => {
36027                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36028            }
36029            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36030            CELLULAR_CONFIG_DATA::ID => {
36031                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36032            }
36033            CELLULAR_STATUS_DATA::ID => {
36034                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36035            }
36036            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36037                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36038            )),
36039            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36040                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36041            )),
36042            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36043            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36044            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36045            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36046            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36047            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36048                COMPONENT_INFORMATION_DATA::random(rng),
36049            )),
36050            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36051                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36052            )),
36053            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36054                COMPONENT_METADATA_DATA::random(rng),
36055            )),
36056            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36057                CONTROL_SYSTEM_STATE_DATA::random(rng),
36058            )),
36059            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36060                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36061            )),
36062            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36063            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36064            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36065                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36066            )),
36067            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36068            DEBUG_FLOAT_ARRAY_DATA::ID => {
36069                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36070            }
36071            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36072            DISTANCE_SENSOR_DATA::ID => {
36073                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36074            }
36075            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36076            ENCAPSULATED_DATA_DATA::ID => {
36077                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36078            }
36079            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36080            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36081            ESTIMATOR_STATUS_DATA::ID => {
36082                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36083            }
36084            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36085            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36086                EXTENDED_SYS_STATE_DATA::random(rng),
36087            )),
36088            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36089            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36090                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36091            )),
36092            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36093                FLIGHT_INFORMATION_DATA::random(rng),
36094            )),
36095            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36096            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36097            GENERATOR_STATUS_DATA::ID => {
36098                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36099            }
36100            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36101                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36102            )),
36103            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36104                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36105            )),
36106            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36107                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36108            )),
36109            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36110                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36111            )),
36112            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36113                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36114            )),
36115            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36116                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36117                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36118                ))
36119            }
36120            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36121                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36122            )),
36123            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36124                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36125            )),
36126            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36127                GLOBAL_POSITION_INT_DATA::random(rng),
36128            )),
36129            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36130                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36131            )),
36132            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36133                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36134                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36135                ))
36136            }
36137            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36138            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36139            GPS_GLOBAL_ORIGIN_DATA::ID => {
36140                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36141            }
36142            GPS_INJECT_DATA_DATA::ID => {
36143                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36144            }
36145            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36146            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36147            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36148            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36149            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36150            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36151            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36152            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36153            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36154            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36155                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36156            )),
36157            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36158            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36159            HIL_OPTICAL_FLOW_DATA::ID => {
36160                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36161            }
36162            HIL_RC_INPUTS_RAW_DATA::ID => {
36163                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36164            }
36165            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36166            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36167            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36168                HIL_STATE_QUATERNION_DATA::random(rng),
36169            )),
36170            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36171            HYGROMETER_SENSOR_DATA::ID => {
36172                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36173            }
36174            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36175                ILLUMINATOR_STATUS_DATA::random(rng),
36176            )),
36177            ISBD_LINK_STATUS_DATA::ID => {
36178                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36179            }
36180            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36181            LINK_NODE_STATUS_DATA::ID => {
36182                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36183            }
36184            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36185                LOCAL_POSITION_NED_DATA::random(rng),
36186            )),
36187            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36188                LOCAL_POSITION_NED_COV_DATA::random(rng),
36189            )),
36190            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36191                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36192                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36193                ))
36194            }
36195            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36196            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36197            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36198                LOGGING_DATA_ACKED_DATA::random(rng),
36199            )),
36200            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36201            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36202            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36203            LOG_REQUEST_DATA_DATA::ID => {
36204                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36205            }
36206            LOG_REQUEST_END_DATA::ID => {
36207                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36208            }
36209            LOG_REQUEST_LIST_DATA::ID => {
36210                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36211            }
36212            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36213            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36214            MANUAL_SETPOINT_DATA::ID => {
36215                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36216            }
36217            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36218            MESSAGE_INTERVAL_DATA::ID => {
36219                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36220            }
36221            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36222            MISSION_CLEAR_ALL_DATA::ID => {
36223                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36224            }
36225            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36226            MISSION_CURRENT_DATA::ID => {
36227                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36228            }
36229            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36230            MISSION_ITEM_INT_DATA::ID => {
36231                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36232            }
36233            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36234                MISSION_ITEM_REACHED_DATA::random(rng),
36235            )),
36236            MISSION_REQUEST_DATA::ID => {
36237                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36238            }
36239            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36240                MISSION_REQUEST_INT_DATA::random(rng),
36241            )),
36242            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36243                MISSION_REQUEST_LIST_DATA::random(rng),
36244            )),
36245            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36246                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36247            )),
36248            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36249                MISSION_SET_CURRENT_DATA::random(rng),
36250            )),
36251            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36252                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36253            )),
36254            MOUNT_ORIENTATION_DATA::ID => {
36255                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36256            }
36257            NAMED_VALUE_FLOAT_DATA::ID => {
36258                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36259            }
36260            NAMED_VALUE_INT_DATA::ID => {
36261                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36262            }
36263            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36264                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36265            )),
36266            OBSTACLE_DISTANCE_DATA::ID => {
36267                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36268            }
36269            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36270            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36271                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36272            )),
36273            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36274                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36275            )),
36276            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36277                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36278            )),
36279            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36280                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36281            )),
36282            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36283                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36284            )),
36285            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36286                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36287            )),
36288            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36289                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36290            )),
36291            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36292                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36293            )),
36294            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36295                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36296            )),
36297            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36298                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36299            )),
36300            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36301            OPTICAL_FLOW_RAD_DATA::ID => {
36302                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36303            }
36304            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36305                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36306            )),
36307            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36308            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36309                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36310            )),
36311            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36312                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36313            )),
36314            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36315            PARAM_EXT_VALUE_DATA::ID => {
36316                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36317            }
36318            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36319            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36320                PARAM_REQUEST_LIST_DATA::random(rng),
36321            )),
36322            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36323                PARAM_REQUEST_READ_DATA::random(rng),
36324            )),
36325            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36326            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36327            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36328            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36329            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36330            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36331                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36332            )),
36333            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36334                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36335            )),
36336            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36337            PROTOCOL_VERSION_DATA::ID => {
36338                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36339            }
36340            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36341            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36342            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36343            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36344            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36345            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36346                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36347            )),
36348            RC_CHANNELS_RAW_DATA::ID => {
36349                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36350            }
36351            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36352                RC_CHANNELS_SCALED_DATA::random(rng),
36353            )),
36354            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36355                REQUEST_DATA_STREAM_DATA::random(rng),
36356            )),
36357            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36358            RESOURCE_REQUEST_DATA::ID => {
36359                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36360            }
36361            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36362                RESPONSE_EVENT_ERROR_DATA::random(rng),
36363            )),
36364            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36365                SAFETY_ALLOWED_AREA_DATA::random(rng),
36366            )),
36367            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36368                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36369            )),
36370            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36371            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36372            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36373            SCALED_PRESSURE_DATA::ID => {
36374                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36375            }
36376            SCALED_PRESSURE2_DATA::ID => {
36377                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36378            }
36379            SCALED_PRESSURE3_DATA::ID => {
36380                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36381            }
36382            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36383            SERVO_OUTPUT_RAW_DATA::ID => {
36384                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36385            }
36386            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36387            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36388                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36389            )),
36390            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36391                SET_ATTITUDE_TARGET_DATA::random(rng),
36392            )),
36393            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36394                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36395            )),
36396            SET_HOME_POSITION_DATA::ID => {
36397                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36398            }
36399            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36400            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36401                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36402            )),
36403            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36404                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36405            )),
36406            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36407            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36408                SMART_BATTERY_INFO_DATA::random(rng),
36409            )),
36410            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36411            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36412                STORAGE_INFORMATION_DATA::random(rng),
36413            )),
36414            SUPPORTED_TUNES_DATA::ID => {
36415                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36416            }
36417            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36418            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36419            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36420            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36421            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36422            TERRAIN_REQUEST_DATA::ID => {
36423                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36424            }
36425            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36426            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36427                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36428            )),
36429            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36430                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36431                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36432                ))
36433            }
36434            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36435                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36436                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36437                ))
36438            }
36439            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36440            UAVCAN_NODE_INFO_DATA::ID => {
36441                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36442            }
36443            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36444                UAVCAN_NODE_STATUS_DATA::random(rng),
36445            )),
36446            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36447                UTM_GLOBAL_POSITION_DATA::random(rng),
36448            )),
36449            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36450            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36451            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36452            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36453                VICON_POSITION_ESTIMATE_DATA::random(rng),
36454            )),
36455            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36456                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36457            )),
36458            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36459                VIDEO_STREAM_STATUS_DATA::random(rng),
36460            )),
36461            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36462                VISION_POSITION_ESTIMATE_DATA::random(rng),
36463            )),
36464            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36465                VISION_SPEED_ESTIMATE_DATA::random(rng),
36466            )),
36467            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36468            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36469            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36470            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36471            _ => None,
36472        }
36473    }
36474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36475        match self {
36476            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36477            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36478            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36479            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36480            Self::ALTITUDE(body) => body.ser(version, bytes),
36481            Self::ARRAY_TEST_0(body) => body.ser(version, bytes),
36482            Self::ARRAY_TEST_1(body) => body.ser(version, bytes),
36483            Self::ARRAY_TEST_3(body) => body.ser(version, bytes),
36484            Self::ARRAY_TEST_4(body) => body.ser(version, bytes),
36485            Self::ARRAY_TEST_5(body) => body.ser(version, bytes),
36486            Self::ARRAY_TEST_6(body) => body.ser(version, bytes),
36487            Self::ARRAY_TEST_7(body) => body.ser(version, bytes),
36488            Self::ARRAY_TEST_8(body) => body.ser(version, bytes),
36489            Self::ATTITUDE(body) => body.ser(version, bytes),
36490            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36491            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36492            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36493            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36494            Self::AUTH_KEY(body) => body.ser(version, bytes),
36495            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36496            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36497            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36498            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36499            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36500            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36501            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36502            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36503            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36504            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36505            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36506            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36507            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36508            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36509            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36510            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36511            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36512            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36513            Self::CAN_FRAME(body) => body.ser(version, bytes),
36514            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36515            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36516            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36517            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36518            Self::COLLISION(body) => body.ser(version, bytes),
36519            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36520            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36521            Self::COMMAND_INT(body) => body.ser(version, bytes),
36522            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36523            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36524            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36525            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36526            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36527            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36528            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36529            Self::DATA_STREAM(body) => body.ser(version, bytes),
36530            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36531            Self::DEBUG(body) => body.ser(version, bytes),
36532            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36533            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36534            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36535            Self::EFI_STATUS(body) => body.ser(version, bytes),
36536            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36537            Self::ESC_INFO(body) => body.ser(version, bytes),
36538            Self::ESC_STATUS(body) => body.ser(version, bytes),
36539            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36540            Self::EVENT(body) => body.ser(version, bytes),
36541            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36542            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36543            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36544            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36545            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36546            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36547            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36548            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36549            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36550            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36551            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36552            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36553            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36554            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36555            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36556            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36557            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36558            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36559            Self::GPS2_RAW(body) => body.ser(version, bytes),
36560            Self::GPS2_RTK(body) => body.ser(version, bytes),
36561            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36562            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36563            Self::GPS_INPUT(body) => body.ser(version, bytes),
36564            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36565            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36566            Self::GPS_RTK(body) => body.ser(version, bytes),
36567            Self::GPS_STATUS(body) => body.ser(version, bytes),
36568            Self::HEARTBEAT(body) => body.ser(version, bytes),
36569            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36570            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36571            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36572            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36573            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36574            Self::HIL_GPS(body) => body.ser(version, bytes),
36575            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36576            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36577            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36578            Self::HIL_STATE(body) => body.ser(version, bytes),
36579            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36580            Self::HOME_POSITION(body) => body.ser(version, bytes),
36581            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36582            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36583            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36584            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36585            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36586            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36587            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36588            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36589            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36590            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36591            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36592            Self::LOG_DATA(body) => body.ser(version, bytes),
36593            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36594            Self::LOG_ERASE(body) => body.ser(version, bytes),
36595            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36596            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36597            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36598            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36599            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36600            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36601            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36602            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36603            Self::MISSION_ACK(body) => body.ser(version, bytes),
36604            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36605            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36606            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36607            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36608            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36609            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36610            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36611            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36612            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36613            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36614            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36615            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36616            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36617            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36618            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36619            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36620            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36621            Self::ODOMETRY(body) => body.ser(version, bytes),
36622            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36623            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36624            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36625            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36626            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36627            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36628            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36629            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36630            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36631            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36632            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36633            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36634            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36635            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36636            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36637            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36638            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36639            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36640            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36641            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36642            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36643            Self::PARAM_SET(body) => body.ser(version, bytes),
36644            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36645            Self::PING(body) => body.ser(version, bytes),
36646            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36647            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36648            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36649            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36650            Self::POWER_STATUS(body) => body.ser(version, bytes),
36651            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36652            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36653            Self::RAW_IMU(body) => body.ser(version, bytes),
36654            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36655            Self::RAW_RPM(body) => body.ser(version, bytes),
36656            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36657            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36658            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36659            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36660            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36661            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36662            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36663            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36664            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36665            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36666            Self::SCALED_IMU(body) => body.ser(version, bytes),
36667            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36668            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36669            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36670            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36671            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36672            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36673            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36674            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36675            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36676            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36677            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36678            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36679            Self::SET_MODE(body) => body.ser(version, bytes),
36680            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36681            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36682            Self::SIM_STATE(body) => body.ser(version, bytes),
36683            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36684            Self::STATUSTEXT(body) => body.ser(version, bytes),
36685            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36686            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36687            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36688            Self::SYS_STATUS(body) => body.ser(version, bytes),
36689            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36690            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36691            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36692            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36693            Self::TIMESYNC(body) => body.ser(version, bytes),
36694            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36695            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36696            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36697            Self::TUNNEL(body) => body.ser(version, bytes),
36698            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36699            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36700            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36701            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36702            Self::VFR_HUD(body) => body.ser(version, bytes),
36703            Self::VIBRATION(body) => body.ser(version, bytes),
36704            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36705            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36706            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36707            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36708            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36709            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36710            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36711            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36712            Self::WIND_COV(body) => body.ser(version, bytes),
36713        }
36714    }
36715    fn extra_crc(id: u32) -> u8 {
36716        match id {
36717            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36718            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36719            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36720            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36721            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36722            ARRAY_TEST_0_DATA::ID => ARRAY_TEST_0_DATA::EXTRA_CRC,
36723            ARRAY_TEST_1_DATA::ID => ARRAY_TEST_1_DATA::EXTRA_CRC,
36724            ARRAY_TEST_3_DATA::ID => ARRAY_TEST_3_DATA::EXTRA_CRC,
36725            ARRAY_TEST_4_DATA::ID => ARRAY_TEST_4_DATA::EXTRA_CRC,
36726            ARRAY_TEST_5_DATA::ID => ARRAY_TEST_5_DATA::EXTRA_CRC,
36727            ARRAY_TEST_6_DATA::ID => ARRAY_TEST_6_DATA::EXTRA_CRC,
36728            ARRAY_TEST_7_DATA::ID => ARRAY_TEST_7_DATA::EXTRA_CRC,
36729            ARRAY_TEST_8_DATA::ID => ARRAY_TEST_8_DATA::EXTRA_CRC,
36730            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36731            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36732            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36733            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36734            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36735            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36736            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36737                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36738            }
36739            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36740            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36741            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36742            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36743            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36744            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36745            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36746            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36747            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36748            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36749            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36750            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36751            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36752            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36753            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36754            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36755            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36756            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36757            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36758            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36759            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36760            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36761            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36762            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36763            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36764            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36765            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36766            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36767            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36768            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36769            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36770            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36771            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36772            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36773            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36774            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36775            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36776            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36777            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36778            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36779            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36780            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36781            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36782            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36783            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36784            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36785            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36786            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36787            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36788            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36789            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36790            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36791            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36792            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36793            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36794            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36795            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36796            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36797                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36798            }
36799            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36800            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36801            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36802            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36803            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36804                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36805            }
36806            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36807            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36808            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36809            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36810            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36811            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36812            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36813            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36814            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36815            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36816            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36817            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36818            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36819            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36820            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36821            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36822            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36823            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36824            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36825            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36826            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36827            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36828            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36829            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36830            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36831            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36832            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36833            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36834            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36835            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36836                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36837            }
36838            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36839            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36840            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36841            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36842            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36843            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36844            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36845            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36846            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36847            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36848            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36849            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36850            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36851            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36852            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36853            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36854            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36855            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36856            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36857            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36858            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36859            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36860            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36861            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36862            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36863            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36864            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36865            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36866            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36867            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36868            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36869            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36870            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36871            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36872            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36873            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36874            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36875            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36876            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36877            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36878            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36879            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36880            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36881            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36882            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36883            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36884            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36885            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36886            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36887            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36888            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36889            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36890            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36891            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36892            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36893            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36894            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36895            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36896            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36897            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36898            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36899            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36900            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36901            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36902            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36903            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36904            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36905            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36906            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36907            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36908            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36909            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36910            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36911            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36912            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36913            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36914            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36915            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36916            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36917            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36918            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36919            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36920            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36921            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36922            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36923            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36924            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36925            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36926            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36927            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36928            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36929            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36930                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36931            }
36932            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36933            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36934            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36935            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36936            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36937            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36938            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36939            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36940            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36941            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36942            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36943            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36944            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36945            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36946            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36947                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36948            }
36949            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36950                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36951            }
36952            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36953            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36954            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36955            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36956            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36957            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36958            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36959            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36960            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36961            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36962            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36963            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36964            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36965            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36966            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36967            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36968            _ => 0,
36969        }
36970    }
36971    fn target_system_id(&self) -> Option<u8> {
36972        match self {
36973            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36974            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36975            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36976            Self::CAN_FRAME(inner) => Some(inner.target_system),
36977            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36978            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36979            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36980            Self::COMMAND_INT(inner) => Some(inner.target_system),
36981            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36982            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36983            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36984            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36985            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36986            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36987            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36988            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36989            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36990            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36991            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36992            Self::LOG_ERASE(inner) => Some(inner.target_system),
36993            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36994            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36995            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36996            Self::MISSION_ACK(inner) => Some(inner.target_system),
36997            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36998            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36999            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37000            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37001            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37002            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37003            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37004            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37005            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37006            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37007            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37008            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37009            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37010            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37011            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37012            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37013            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37014            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37015            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37016            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37017            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37018            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37019            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37020            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37021            Self::PARAM_SET(inner) => Some(inner.target_system),
37022            Self::PING(inner) => Some(inner.target_system),
37023            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37024            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37025            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37026            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37027            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37028            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37029            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37030            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37031            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37032            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37033            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37034            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37035            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37036            Self::SET_MODE(inner) => Some(inner.target_system),
37037            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37038            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37039            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37040            Self::TIMESYNC(inner) => Some(inner.target_system),
37041            Self::TUNNEL(inner) => Some(inner.target_system),
37042            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37043            _ => None,
37044        }
37045    }
37046    fn target_component_id(&self) -> Option<u8> {
37047        match self {
37048            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37049            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37050            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37051            Self::CAN_FRAME(inner) => Some(inner.target_component),
37052            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37053            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37054            Self::COMMAND_INT(inner) => Some(inner.target_component),
37055            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37056            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37057            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37058            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37059            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37060            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37061            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37062            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37063            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37064            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37065            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37066            Self::LOG_ERASE(inner) => Some(inner.target_component),
37067            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37068            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37069            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37070            Self::MISSION_ACK(inner) => Some(inner.target_component),
37071            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37072            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37073            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37074            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37075            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37076            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37077            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37078            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37079            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37080            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37081            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37082            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37083            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37084            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37085            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37086            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37087            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37088            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37089            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37090            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37091            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37092            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37093            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37094            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37095            Self::PARAM_SET(inner) => Some(inner.target_component),
37096            Self::PING(inner) => Some(inner.target_component),
37097            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37098            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37099            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37100            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37101            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37102            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37103            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37104            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37105            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37106            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37107            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37108            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37109            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37110            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37111            Self::TIMESYNC(inner) => Some(inner.target_component),
37112            Self::TUNNEL(inner) => Some(inner.target_component),
37113            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37114            _ => None,
37115        }
37116    }
37117}